|
|
|
@ -4438,7 +4438,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void deleteApplicationDataByTenantDomain(int tenantId) throws ApplicationManagementException {
|
|
|
|
|
public void deleteApplicationDataByTenantId(int tenantId) throws ApplicationManagementException {
|
|
|
|
|
try {
|
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
|
vppApplicationDAO.deleteAssociationByTenant(tenantId);
|
|
|
|
@ -4466,41 +4466,36 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
|
String msg = "Error occurred while observing the database connection to delete applications for tenant with " +
|
|
|
|
|
"domain: " + tenantId;
|
|
|
|
|
"tenant ID: " + tenantId;
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
|
String msg = "Database access error is occurred when getting applications for tenant with domain: "
|
|
|
|
|
String msg = "Database access error is occurred when getting applications for tenant with tenant Id: "
|
|
|
|
|
+ tenantId;
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
|
String msg = "Error occurred while deleting life-cycle state data of application releases of the tenant"
|
|
|
|
|
+ " of domain: " + tenantId ;
|
|
|
|
|
+ " of id: " + tenantId ;
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
} catch (ReviewManagementDAOException e) {
|
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
|
String msg = "Error occurred while deleting reviews of application releases of the applications"
|
|
|
|
|
+ " of tenant of domain: " + tenantId ;
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
String msg = "Error getting tenant ID from domain: "
|
|
|
|
|
+ tenantId;
|
|
|
|
|
+ " of tenant of id: " + tenantId ;
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void deleteApplicationArtifactsByTenantDomain(int tenantId) throws ApplicationManagementException {
|
|
|
|
|
public void deleteApplicationArtifactsByTenantId(int tenantId) throws ApplicationManagementException {
|
|
|
|
|
try {
|
|
|
|
|
DataHolder.getInstance().getApplicationStorageManager().deleteAppFolderOfTenant(tenantId);
|
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
|
String msg = "Error deleting app artifacts of tenant of domain: " + tenantId;
|
|
|
|
|
String msg = "Error deleting app artifacts of tenant of Id: " + tenantId;
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
|
}
|
|
|
|
|