src/main/java/org/edgegallery/appstore/interfaces/apackage/facade/dto/PackageDto.java
public static PackageDto of(Release release) {
        PackageDto dto = new PackageDto();
        dto.packageId = release.getPackageId();
        dto.size = release.getPackageFile().getSize();
        dto.format = release.getAppBasicInfo().getFileStructure();
        dto.createTime = release.getCreateTime();
        dto.name = release.getAppBasicInfo().getAppName();
        dto.version = release.getAppBasicInfo().getVersion();
        dto.type = release.getApplicationType();
        dto.details = release.getAppBasicInfo().getMarkDownContent();
        dto.affinity = release.getAffinity();
        dto.industry = release.getIndustry();
        dto.contact = release.getAppBasicInfo().getContact();
        dto.appId = release.getAppId();
        dto.userId = release.getUser().getUserId();
        dto.userName = release.getUser().getUserName();
        dto.status = release.getStatus();
        dto.shortDesc = release.getAppBasicInfo().getAppDesc();
        dto.showType = release.getShowType();
        dto.testTaskId = release.getTestTaskId();
        dto.provider = release.getAppBasicInfo().getProvider();
        if (release.getDemoVideo() != null) {
            dto.demoVideoName = release.getDemoVideo().getOriginalFileName();
        }
        dto.deployMode = release.getDeployMode();
        dto.experienceAble = release.isExperienceAble();
        return dto;
    }
/**
     * Transfer Release object to PackageDto object.
     *
     * @param release Release object.
     * @return PackageDto
     */
Transfer Release object to PackageDto object.
@param release Release object.
Transfer Release object to PackageDto object . @param release Release object .
public static PackageDto of(Release release) {
        PackageDto dto = new PackageDto();
        dto.packageId = release.getPackageId();
        dto.size = release.getPackageFile().getSize();
        dto.format = release.getAppBasicInfo().getFileStructure();
        dto.createTime = release.getCreateTime();
        dto.name = release.getAppBasicInfo().getAppName();
        dto.version = release.getAppBasicInfo().getVersion();
        dto.type = release.getApplicationType();
        dto.details = release.getAppBasicInfo().getMarkDownContent();
        dto.affinity = release.getAffinity();
        dto.industry = release.getIndustry();
        dto.contact = release.getAppBasicInfo().getContact();
        dto.appId = release.getAppId();
        dto.userId = release.getUser().getUserId();
        dto.userName = release.getUser().getUserName();
        dto.status = release.getStatus();
        dto.shortDesc = release.getAppBasicInfo().getAppDesc();
        dto.showType = release.getShowType();
        dto.testTaskId = release.getTestTaskId();
        dto.provider = release.getAppBasicInfo().getProvider();
        if (release.getDemoVideo() != null) {
            dto.demoVideoName = release.getDemoVideo().getOriginalFileName();
        }
        dto.deployMode = release.getDeployMode();
        dto.experienceAble = release.isExperienceAble();
        return dto;
    }
public static PackageDto of ( Release release ) { PackageDto dto = new PackageDto ( ) ; dto . packageId = release . getPackageId ( ) ; dto . size = release . getPackageFile ( ) . getSize ( ) ; dto . format = release . getAppBasicInfo ( ) . getFileStructure ( ) ; dto . createTime = release . getCreateTime ( ) ; dto . name = release . getAppBasicInfo ( ) . getAppName ( ) ; dto . version = release . getAppBasicInfo ( ) . getVersion ( ) ; dto . type = release . getApplicationType ( ) ; dto . details = release . getAppBasicInfo ( ) . getMarkDownContent ( ) ; dto . affinity = release . getAffinity ( ) ; dto . industry = release . getIndustry ( ) ; dto . contact = release . getAppBasicInfo ( ) . getContact ( ) ; dto . appId = release . getAppId ( ) ; dto . userId = release . getUser ( ) . getUserId ( ) ; dto . userName = release . getUser ( ) . getUserName ( ) ; dto . status = release . getStatus ( ) ; dto . shortDesc = release . getAppBasicInfo ( ) . getAppDesc ( ) ; dto . showType = release . getShowType ( ) ; dto . testTaskId = release . getTestTaskId ( ) ; dto . provider = release . getAppBasicInfo ( ) . getProvider ( ) ; if ( release . getDemoVideo ( ) != null ) { dto . demoVideoName = release . getDemoVideo ( ) . getOriginalFileName ( ) ; } dto . deployMode = release . getDeployMode ( ) ; dto . experienceAble = release . isExperienceAble ( ) ; return dto ; }
Transfer Release object to PackageDto object.
Transfer Release object to PackageDto object .