Search in sources :

Example 1 with DumpExportPkgVersion

use of org.haiku.haikudepotserver.pkg.model.dumpexport.DumpExportPkgVersion in project haikudepotserver by haiku.

the class PkgDumpExportJobRunner method createDumpPkgVersion.

private DumpExportPkgVersion createDumpPkgVersion(ObjectContext context, PkgVersion pkgVersion, NaturalLanguage naturalLanguage, PkgLocalizationLookupService pkgLocalizationLookupService) {
    DumpExportPkgVersion result = new DumpExportPkgVersion();
    result.setCreateTimestamp(pkgVersion.getCreateTimestamp().getTime());
    result.setModifyTimestamp(pkgVersion.getModifyTimestamp().getTime());
    result.setMajor(pkgVersion.getMajor());
    result.setMinor(pkgVersion.getMinor());
    result.setMicro(pkgVersion.getMicro());
    result.setPreRelease(pkgVersion.getPreRelease());
    result.setRevision(null == pkgVersion.getRevision() ? null : pkgVersion.getRevision().longValue());
    result.setArchitectureCode(pkgVersion.getArchitecture().getCode());
    result.setPayloadLength(pkgVersion.getPayloadLength());
    ResolvedPkgVersionLocalization resolvedPkgVersionLocalization = pkgLocalizationLookupService.resolvePkgVersionLocalization(context, pkgVersion, null, naturalLanguage);
    result.setDescription(resolvedPkgVersionLocalization.getDescription());
    result.setSummary(resolvedPkgVersionLocalization.getSummary());
    result.setTitle(resolvedPkgVersionLocalization.getTitle());
    return result;
}
Also used : ResolvedPkgVersionLocalization(org.haiku.haikudepotserver.pkg.model.ResolvedPkgVersionLocalization) DumpExportPkgVersion(org.haiku.haikudepotserver.pkg.model.dumpexport.DumpExportPkgVersion)

Aggregations

ResolvedPkgVersionLocalization (org.haiku.haikudepotserver.pkg.model.ResolvedPkgVersionLocalization)1 DumpExportPkgVersion (org.haiku.haikudepotserver.pkg.model.dumpexport.DumpExportPkgVersion)1