|
|
@ -172,7 +172,9 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
ApplicationManager applicationManager = APIUtil.getApplicationManager();
|
|
|
|
ApplicationManager applicationManager = APIUtil.getApplicationManager();
|
|
|
|
ApplicationArtifact artifact = ApplicationManagementUtil.constructApplicationArtifact(releaseWrapper.getIcon(), releaseWrapper.getScreenshots(),
|
|
|
|
ApplicationArtifact artifact = ApplicationManagementUtil.constructApplicationArtifact(releaseWrapper.getIcon(), releaseWrapper.getScreenshots(),
|
|
|
|
releaseWrapper.getBinaryFile(), releaseWrapper.getBanner());
|
|
|
|
null, releaseWrapper.getBanner());
|
|
|
|
|
|
|
|
artifact.setInstallerStream(releaseWrapper.getInstallerStream());
|
|
|
|
|
|
|
|
artifact.setInstallerName(releaseWrapper.getInstallerName());
|
|
|
|
ApplicationDTO applicationDTO = applicationManager.getApplication(appId);
|
|
|
|
ApplicationDTO applicationDTO = applicationManager.getApplication(appId);
|
|
|
|
DeviceType deviceType = APIUtil.getDeviceTypeData(applicationDTO.getDeviceTypeId());
|
|
|
|
DeviceType deviceType = APIUtil.getDeviceTypeData(applicationDTO.getDeviceTypeId());
|
|
|
|
ApplicationReleaseDTO releaseDTO = APIUtil.releaseWrapperToReleaseDTO(releaseWrapper);
|
|
|
|
ApplicationReleaseDTO releaseDTO = APIUtil.releaseWrapperToReleaseDTO(releaseWrapper);
|
|
|
@ -275,7 +277,9 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ApplicationWrapper wrapper = (ApplicationWrapper) app;
|
|
|
|
ApplicationWrapper wrapper = (ApplicationWrapper) app;
|
|
|
|
EntAppReleaseWrapper releaseWrapper = wrapper.getEntAppReleaseWrappers().get(0);
|
|
|
|
EntAppReleaseWrapper releaseWrapper = wrapper.getEntAppReleaseWrappers().get(0);
|
|
|
|
artifact = ApplicationManagementUtil.constructApplicationArtifact(releaseWrapper.getIcon(),
|
|
|
|
artifact = ApplicationManagementUtil.constructApplicationArtifact(releaseWrapper.getIcon(),
|
|
|
|
releaseWrapper.getScreenshots(), releaseWrapper.getBinaryFile(), releaseWrapper.getBanner());
|
|
|
|
releaseWrapper.getScreenshots(), null, releaseWrapper.getBanner());
|
|
|
|
|
|
|
|
artifact.setInstallerName(releaseWrapper.getInstallerName());
|
|
|
|
|
|
|
|
artifact.setInstallerStream(releaseWrapper.getInstallerStream());
|
|
|
|
releaseDTO = uploadEntAppReleaseArtifacts(releaseDTO,
|
|
|
|
releaseDTO = uploadEntAppReleaseArtifacts(releaseDTO,
|
|
|
|
artifact, wrapper.getDeviceType(), false);
|
|
|
|
artifact, wrapper.getDeviceType(), false);
|
|
|
|
} else if (app instanceof PublicAppWrapper) {
|
|
|
|
} else if (app instanceof PublicAppWrapper) {
|
|
|
@ -294,7 +298,9 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
CustomAppWrapper wrapper = (CustomAppWrapper) app;
|
|
|
|
CustomAppWrapper wrapper = (CustomAppWrapper) app;
|
|
|
|
CustomAppReleaseWrapper releaseWrapper = wrapper.getCustomAppReleaseWrappers().get(0);
|
|
|
|
CustomAppReleaseWrapper releaseWrapper = wrapper.getCustomAppReleaseWrappers().get(0);
|
|
|
|
artifact = ApplicationManagementUtil.constructApplicationArtifact(releaseWrapper.getIcon(),
|
|
|
|
artifact = ApplicationManagementUtil.constructApplicationArtifact(releaseWrapper.getIcon(),
|
|
|
|
releaseWrapper.getScreenshots(), releaseWrapper.getBinaryFile(), releaseWrapper.getBanner());
|
|
|
|
releaseWrapper.getScreenshots(), null, releaseWrapper.getBanner());
|
|
|
|
|
|
|
|
artifact.setInstallerName(releaseWrapper.getInstallerName());
|
|
|
|
|
|
|
|
artifact.setInstallerStream(releaseWrapper.getInstallerStream());
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
releaseDTO = uploadCustomAppReleaseArtifacts(releaseDTO, artifact, wrapper.getDeviceType());
|
|
|
|
releaseDTO = uploadCustomAppReleaseArtifacts(releaseDTO, artifact, wrapper.getDeviceType());
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
@ -3820,7 +3826,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
public void validateEntAppReleaseCreatingRequest(EntAppReleaseWrapper releaseWrapper, String deviceType)
|
|
|
|
public void validateEntAppReleaseCreatingRequest(EntAppReleaseWrapper releaseWrapper, String deviceType)
|
|
|
|
throws RequestValidatingException, ApplicationManagementException {
|
|
|
|
throws RequestValidatingException, ApplicationManagementException {
|
|
|
|
validateReleaseCreatingRequest(releaseWrapper, deviceType);
|
|
|
|
validateReleaseCreatingRequest(releaseWrapper, deviceType);
|
|
|
|
validateBinaryArtifact(releaseWrapper.getBinaryFile());
|
|
|
|
//validateBinaryArtifact(releaseWrapper.getBinaryFile());
|
|
|
|
|
|
|
|
validateInstallerName(releaseWrapper.getInstallerName());
|
|
|
|
validateImageArtifacts(releaseWrapper.getIcon(), releaseWrapper.getScreenshots());
|
|
|
|
validateImageArtifacts(releaseWrapper.getIcon(), releaseWrapper.getScreenshots());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3828,7 +3835,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
public void validateCustomAppReleaseCreatingRequest(CustomAppReleaseWrapper releaseWrapper, String deviceType)
|
|
|
|
public void validateCustomAppReleaseCreatingRequest(CustomAppReleaseWrapper releaseWrapper, String deviceType)
|
|
|
|
throws RequestValidatingException, ApplicationManagementException {
|
|
|
|
throws RequestValidatingException, ApplicationManagementException {
|
|
|
|
validateReleaseCreatingRequest(releaseWrapper, deviceType);
|
|
|
|
validateReleaseCreatingRequest(releaseWrapper, deviceType);
|
|
|
|
validateBinaryArtifact(releaseWrapper.getBinaryFile());
|
|
|
|
//validateBinaryArtifact(releaseWrapper.getBinaryFile());
|
|
|
|
|
|
|
|
validateInstallerName(releaseWrapper.getInstallerName());
|
|
|
|
validateImageArtifacts(releaseWrapper.getIcon(), releaseWrapper.getScreenshots());
|
|
|
|
validateImageArtifacts(releaseWrapper.getIcon(), releaseWrapper.getScreenshots());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3897,6 +3905,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void validateInstallerName(String installerName) throws RequestValidatingException {
|
|
|
|
|
|
|
|
if (installerName == null) {
|
|
|
|
|
|
|
|
String msg = "Installer name is not found with the application release creating request for ENTERPRISE app "
|
|
|
|
|
|
|
|
+ "creating request.";
|
|
|
|
|
|
|
|
log.error(msg);
|
|
|
|
|
|
|
|
throw new RequestValidatingException(msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void validateBinaryArtifact(Attachment binaryFile) throws RequestValidatingException {
|
|
|
|
public void validateBinaryArtifact(Attachment binaryFile) throws RequestValidatingException {
|
|
|
|
if (binaryFile == null) {
|
|
|
|
if (binaryFile == null) {
|
|
|
|