|
|
@ -3324,11 +3324,13 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ApplicationRelease updateEntAppRelease(String releaseUuid, EntAppReleaseWrapper entAppReleaseWrapper,
|
|
|
|
public ApplicationRelease updateEntAppRelease(String releaseUuid, EntAppReleaseWrapper entAppReleaseWrapper) throws ApplicationManagementException {
|
|
|
|
ApplicationArtifact applicationArtifact) throws ApplicationManagementException {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
ApplicationArtifact applicationArtifact = ApplicationManagementUtil.
|
|
|
|
|
|
|
|
constructApplicationArtifact(entAppReleaseWrapper.getIconLink(), entAppReleaseWrapper.getScreenshotLinks(),
|
|
|
|
|
|
|
|
entAppReleaseWrapper.getArtifactLink(), entAppReleaseWrapper.getBannerLink());
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
DeviceType deviceTypeObj = APIUtil.getDeviceTypeData(applicationDTO.getDeviceTypeId());
|
|
|
|
DeviceType deviceTypeObj = APIUtil.getDeviceTypeData(applicationDTO.getDeviceTypeId());
|
|
|
@ -3395,6 +3397,12 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
+ "UUID:" + releaseUuid;
|
|
|
|
+ "UUID:" + releaseUuid;
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
|
|
|
} catch (MalformedURLException e) {
|
|
|
|
|
|
|
|
throw new ApplicationManagementException("Malformed downloadable URL received for the Public app " +
|
|
|
|
|
|
|
|
"release UUID: " + releaseUuid);
|
|
|
|
|
|
|
|
} catch (FileDownloaderServiceException e) {
|
|
|
|
|
|
|
|
throw new ApplicationManagementException("Error encountered while downloading artifact for the Public app " +
|
|
|
|
|
|
|
|
"release UUID: " + releaseUuid);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3405,7 +3413,9 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
|
|
|
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ApplicationArtifact applicationArtifact = ApplicationManagementUtil.constructApplicationArtifact(publicAppReleaseWrapper.getIconLink(), publicAppReleaseWrapper.getScreenshotLinks(), null, null);
|
|
|
|
ApplicationArtifact applicationArtifact = ApplicationManagementUtil.
|
|
|
|
|
|
|
|
constructApplicationArtifact(publicAppReleaseWrapper.getIconLink(), publicAppReleaseWrapper.getScreenshotLinks(),
|
|
|
|
|
|
|
|
null, publicAppReleaseWrapper.getBannerLink());
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
validateAppReleaseUpdating(publicAppReleaseWrapper, applicationDTO, applicationArtifact,
|
|
|
|
validateAppReleaseUpdating(publicAppReleaseWrapper, applicationDTO, applicationArtifact,
|
|
|
@ -3476,11 +3486,13 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ApplicationRelease updateWebAppRelease(String releaseUuid, WebAppReleaseWrapper webAppReleaseWrapper,
|
|
|
|
public ApplicationRelease updateWebAppRelease(String releaseUuid, WebAppReleaseWrapper webAppReleaseWrapper) throws ApplicationManagementException {
|
|
|
|
ApplicationArtifact applicationArtifact) throws ApplicationManagementException {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
ApplicationArtifact applicationArtifact = ApplicationManagementUtil.
|
|
|
|
|
|
|
|
constructApplicationArtifact(webAppReleaseWrapper.getIconLink(), webAppReleaseWrapper.getScreenshotLinks(),
|
|
|
|
|
|
|
|
null, webAppReleaseWrapper.getBannerLink());
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
validateAppReleaseUpdating(webAppReleaseWrapper, applicationDTO, applicationArtifact,
|
|
|
|
validateAppReleaseUpdating(webAppReleaseWrapper, applicationDTO, applicationArtifact,
|
|
|
@ -3535,18 +3547,27 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
+ "release UUID:" + releaseUuid;
|
|
|
|
+ "release UUID:" + releaseUuid;
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
|
|
|
} catch (MalformedURLException e) {
|
|
|
|
|
|
|
|
throw new ApplicationManagementException("Malformed downloadable URL received for the Public app " +
|
|
|
|
|
|
|
|
"release UUID: " + releaseUuid);
|
|
|
|
|
|
|
|
} catch (FileDownloaderServiceException e) {
|
|
|
|
|
|
|
|
throw new ApplicationManagementException("Error encountered while downloading artifact for the Public app " +
|
|
|
|
|
|
|
|
"release UUID: " + releaseUuid);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ApplicationRelease updateCustomAppRelease(String releaseUuid,
|
|
|
|
public ApplicationRelease updateCustomAppRelease(String releaseUuid, CustomAppReleaseWrapper customAppReleaseWrapper)
|
|
|
|
CustomAppReleaseWrapper customAppReleaseWrapper, ApplicationArtifact applicationArtifact)
|
|
|
|
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager();
|
|
|
|
ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
ApplicationArtifact applicationArtifact = ApplicationManagementUtil.
|
|
|
|
|
|
|
|
constructApplicationArtifact(customAppReleaseWrapper.getIconLink(),
|
|
|
|
|
|
|
|
customAppReleaseWrapper.getScreenshotLinks(), customAppReleaseWrapper.getArtifactLink(),
|
|
|
|
|
|
|
|
customAppReleaseWrapper.getBannerLink());
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(releaseUuid, tenantId);
|
|
|
|
AtomicReference<ApplicationReleaseDTO> applicationReleaseDTO = new AtomicReference<>(
|
|
|
|
AtomicReference<ApplicationReleaseDTO> applicationReleaseDTO = new AtomicReference<>(
|
|
|
@ -3665,6 +3686,12 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
+ "UUID:" + releaseUuid;
|
|
|
|
+ "UUID:" + releaseUuid;
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
|
|
|
} catch (MalformedURLException e) {
|
|
|
|
|
|
|
|
throw new ApplicationManagementException("Malformed downloadable URL received for the Public app " +
|
|
|
|
|
|
|
|
"release UUID: " + releaseUuid);
|
|
|
|
|
|
|
|
} catch (FileDownloaderServiceException e) {
|
|
|
|
|
|
|
|
throw new ApplicationManagementException("Error encountered while downloading artifact for the Public app " +
|
|
|
|
|
|
|
|
"release UUID: " + releaseUuid);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|