|
|
@ -232,7 +232,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
.add(addImageArtifacts(applicationReleaseDTO, applicationArtifact));
|
|
|
|
.add(addImageArtifacts(applicationReleaseDTO, applicationArtifact));
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
String msg = "Error Occured when uploading artifacts of the public app: " + publicAppWrapper.getName();
|
|
|
|
String msg = "Error Occured when uploading artifacts of the public app: " + publicAppWrapper.getName();
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -240,17 +240,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
return addAppDataIntoDB(applicationDTO, tenantId);
|
|
|
|
return addAppDataIntoDB(applicationDTO, tenantId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void deleteApplicationArtifacts(List<String> directoryPaths) throws ApplicationManagementException {
|
|
|
|
private void deleteApplicationArtifacts(List<String> directoryPaths) throws ApplicationManagementException {
|
|
|
|
ApplicationStorageManager applicationStorageManager = DAOUtil.getApplicationStorageManager();
|
|
|
|
ApplicationStorageManager applicationStorageManager = DAOUtil.getApplicationStorageManager();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
applicationStorageManager.deleteAllApplicationReleaseArtifacts(directoryPaths);
|
|
|
|
applicationStorageManager.deleteAllApplicationReleaseArtifacts(directoryPaths);
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
String errorLog = "Error occurred when deleting application artifacts. directory paths: ." + directoryPaths
|
|
|
|
String msg = "Error occurred when deleting application artifacts. directory paths: ." + directoryPaths
|
|
|
|
.toString();
|
|
|
|
.toString();
|
|
|
|
log.error(errorLog);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(errorLog, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -310,13 +308,13 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred when getting database connection for verifying app release data.";
|
|
|
|
String msg = "Error occurred when getting database connection for verifying app release data.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occurred when executing the query for verifying application release existence for "
|
|
|
|
"Error occurred when executing the query for verifying application release existence for "
|
|
|
|
+ "the package.";
|
|
|
|
+ "the package.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -325,8 +323,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
String msg = "Error occurred when getting byte array of binary file. Installer name: " + applicationArtifact
|
|
|
|
String msg = "Error occurred when getting byte array of binary file. Installer name: " + applicationArtifact
|
|
|
|
.getInstallerName();
|
|
|
|
.getInstallerName();
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationStorageManagementException(msg);
|
|
|
|
throw new ApplicationStorageManagementException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return applicationReleaseDTO;
|
|
|
|
return applicationReleaseDTO;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -394,12 +392,12 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred when getting database connection for verifying application "
|
|
|
|
String msg = "Error occurred when getting database connection for verifying application "
|
|
|
|
+ "release existing for new app hash value.";
|
|
|
|
+ "release existing for new app hash value.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when executing the query for verifying application release "
|
|
|
|
String msg = "Error occurred when executing the query for verifying application release "
|
|
|
|
+ "existence for the new app hash value.";
|
|
|
|
+ "existence for the new app hash value.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -411,8 +409,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
String msg = "Error occurred when getting byte array of binary file. Installer name: " + applicationArtifact
|
|
|
|
String msg = "Error occurred when getting byte array of binary file. Installer name: " + applicationArtifact
|
|
|
|
.getInstallerName();
|
|
|
|
.getInstallerName();
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationStorageManagementException(msg);
|
|
|
|
throw new ApplicationStorageManagementException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return applicationReleaseDTO;
|
|
|
|
return applicationReleaseDTO;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -586,16 +584,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred when getting database connection to get applications by filtering from "
|
|
|
|
String msg = "Error occurred when getting database connection to get applications by filtering from "
|
|
|
|
+ "requested filter.";
|
|
|
|
+ "requested filter.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
String msg = "User-store exception while checking whether the user " + userName + " of tenant " + tenantId
|
|
|
|
String msg = "User-store exception while checking whether the user " + userName + " of tenant " + tenantId
|
|
|
|
+ " has the publisher permission";
|
|
|
|
+ " has the publisher permission";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "DAO exception while getting applications for the user " + userName + " of tenant " + tenantId;
|
|
|
|
String msg = "DAO exception while getting applications for the user " + userName + " of tenant " + tenantId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -713,7 +711,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occurred while adding lifecycle state. application name: " + applicationDTO.getName() + ".";
|
|
|
|
"Error occurred while adding lifecycle state. application name: " + applicationDTO.getName() + ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
applicationStorageManager.deleteAllApplicationReleaseArtifacts(
|
|
|
|
applicationStorageManager.deleteAllApplicationReleaseArtifacts(
|
|
|
|
Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
|
Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
@ -721,15 +719,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
String errorLog =
|
|
|
|
String errorLog =
|
|
|
|
"Error occurred when deleting application artifacts. Application artifacts are tried to "
|
|
|
|
"Error occurred when deleting application artifacts. Application artifacts are tried to "
|
|
|
|
+ "delete because of lifecycle state adding issue in the application creating operation.";
|
|
|
|
+ "delete because of lifecycle state adding issue in the application creating operation.";
|
|
|
|
log.error(errorLog);
|
|
|
|
log.error(errorLog, ex);
|
|
|
|
throw new ApplicationManagementException(errorLog, e);
|
|
|
|
throw new ApplicationManagementException(errorLog, ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while adding application or application release. application name: "
|
|
|
|
String msg = "Error occurred while adding application or application release. application name: "
|
|
|
|
+ applicationDTO.getName() + ".";
|
|
|
|
+ applicationDTO.getName() + ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
deleteApplicationArtifacts(Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
|
deleteApplicationArtifacts(Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (LifecycleManagementException e) {
|
|
|
|
} catch (LifecycleManagementException e) {
|
|
|
@ -737,23 +735,23 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occurred when getting initial lifecycle state. application name: " + applicationDTO.getName()
|
|
|
|
"Error occurred when getting initial lifecycle state. application name: " + applicationDTO.getName()
|
|
|
|
+ ".";
|
|
|
|
+ ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
deleteApplicationArtifacts(Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
|
deleteApplicationArtifacts(Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting database connection.";
|
|
|
|
String msg = "Error occurred while getting database connection.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (VisibilityManagementDAOException e) {
|
|
|
|
} catch (VisibilityManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while adding unrestricted roles. application name: " + applicationDTO.getName()
|
|
|
|
String msg = "Error occurred while adding unrestricted roles. application name: " + applicationDTO.getName()
|
|
|
|
+ ".";
|
|
|
|
+ ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
deleteApplicationArtifacts(Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
|
deleteApplicationArtifacts(Collections.singletonList(applicationReleaseDTO.getAppHashValue()));
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Error occurred while disabling AutoCommit.";
|
|
|
|
String msg = "Error occurred while disabling AutoCommit.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -802,23 +800,23 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Error occurred while staring application release creating transaction for application Id: "
|
|
|
|
String msg = "Error occurred while staring application release creating transaction for application Id: "
|
|
|
|
+ applicationId;
|
|
|
|
+ applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while adding application release into IoTS app management ApplicationDTO id of"
|
|
|
|
String msg = "Error occurred while adding application release into IoTS app management ApplicationDTO id of"
|
|
|
|
+ " the application release: " + applicationId;
|
|
|
|
+ " the application release: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while adding new application release lifecycle state to the application"
|
|
|
|
String msg = "Error occurred while adding new application release lifecycle state to the application"
|
|
|
|
+ " release: " + applicationId;
|
|
|
|
+ " release: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while adding new application release for application " + applicationId;
|
|
|
|
String msg = "Error occurred while adding new application release for application " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -839,11 +837,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection for getting application for the "
|
|
|
|
String msg = "Error occurred while obtaining the database connection for getting application for the "
|
|
|
|
+ "application ID: " + applicationId;
|
|
|
|
+ "application ID: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while getting application data for application ID: " + applicationId;
|
|
|
|
String msg = "Error occurred while getting application data for application ID: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -859,7 +857,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
return addImageArtifacts(applicationReleaseDTO, applicationArtifact);
|
|
|
|
return addImageArtifacts(applicationReleaseDTO, applicationArtifact);
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
String msg = "Error occurred while uploading application release artifacts.";
|
|
|
|
String msg = "Error occurred while uploading application release artifacts.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -883,8 +881,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DeviceManagementException e) {
|
|
|
|
} catch (DeviceManagementException e) {
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occurred while getting supported device type versions for device type : " + deviceTypeName;
|
|
|
|
"Error occurred while getting supported device type versions for device type : " + deviceTypeName;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -935,20 +933,20 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get application for application ID: "
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get application for application ID: "
|
|
|
|
+ appId;
|
|
|
|
+ appId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (LifecycleManagementException e) {
|
|
|
|
} catch (LifecycleManagementException e) {
|
|
|
|
String msg = "Error occurred when getting the last state of the application lifecycle flow";
|
|
|
|
String msg = "Error occurred when getting the last state of the application lifecycle flow";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
String msg = "User-store exception while getting application with the application id " + appId;
|
|
|
|
String msg = "User-store exception while getting application with the application id " + appId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occured when getting, either application tags or application categories";
|
|
|
|
String msg = "Error occured when getting, either application tags or application categories";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -993,16 +991,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get application for application "
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get application for application "
|
|
|
|
+ "release UUID: " + releaseUuid;
|
|
|
|
+ "release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
String msg = "User-store exception occurred while getting application for application release UUID " + releaseUuid;
|
|
|
|
String msg = "User-store exception occurred while getting application for application release UUID " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while getting dta which are related to Application.";
|
|
|
|
String msg = "Error occurred while getting dta which are related to Application.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1061,20 +1059,20 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get application for application "
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get application for application "
|
|
|
|
+ "release UUID: " + releaseUuid;
|
|
|
|
+ "release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (LifecycleManagementException e) {
|
|
|
|
} catch (LifecycleManagementException e) {
|
|
|
|
String msg = "Error occurred when getting the last state of the application lifecycle flow";
|
|
|
|
String msg = "Error occurred when getting the last state of the application lifecycle flow";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
String msg = "User-store exception while getting application with the application release UUID " + releaseUuid;
|
|
|
|
String msg = "User-store exception while getting application with the application release UUID " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while getting, application data.";
|
|
|
|
String msg = "Error occurred while getting, application data.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1186,29 +1184,29 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while observing the database connection to delete application which has "
|
|
|
|
String msg = "Error occurred while observing the database connection to delete application which has "
|
|
|
|
+ "application ID: " + applicationId;
|
|
|
|
+ "application ID: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when deleting application which has application ID: "
|
|
|
|
String msg = "Database access error is occurred when deleting application which has application ID: "
|
|
|
|
+ applicationId;
|
|
|
|
+ applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred when getting application data for application id: " + applicationId;
|
|
|
|
String msg = "Error occurred when getting application data for application id: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
String msg = "Error occurred when deleting application artifacts in the file system. Application id: "
|
|
|
|
String msg = "Error occurred when deleting application artifacts in the file system. Application id: "
|
|
|
|
+ applicationId;
|
|
|
|
+ applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured while deleting life-cycle state data of application releases of the application"
|
|
|
|
String msg = "Error occured while deleting life-cycle state data of application releases of the application"
|
|
|
|
+ " which has application ID: " + applicationId;
|
|
|
|
+ " which has application ID: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1241,16 +1239,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while observing the database connection to retire an application which has "
|
|
|
|
String msg = "Error occurred while observing the database connection to retire an application which has "
|
|
|
|
+ "application ID:" + applicationId;
|
|
|
|
+ "application ID:" + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when retiring application which has application ID: "
|
|
|
|
String msg = "Database access error is occurred when retiring application which has application ID: "
|
|
|
|
+ applicationId;
|
|
|
|
+ applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting application data for application id: " + applicationId;
|
|
|
|
String msg = "Error occurred when getting application data for application id: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1295,25 +1293,27 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while observing the database connection to delete application release which "
|
|
|
|
String msg = "Error occurred while observing the database connection to delete application release which "
|
|
|
|
+ "has UUID:" + releaseUuid;
|
|
|
|
+ "has UUID:" + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when deleting application release which has UUID: "
|
|
|
|
String msg = "Database access error is occurred when deleting application release which has UUID: "
|
|
|
|
+ releaseUuid;
|
|
|
|
+ releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred when application release data for application release UUID: " + releaseUuid;
|
|
|
|
String msg = "Error occurred when application release data for application release UUID: " + releaseUuid;
|
|
|
|
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
String msg = "Error occurred when deleting the application release artifact from the file system. "
|
|
|
|
String msg = "Error occurred when deleting the application release artifact from the file system. "
|
|
|
|
+ "Application release UUID: " + releaseUuid;
|
|
|
|
+ "Application release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred when dleting lifecycle data for application release UUID: " + releaseUuid;
|
|
|
|
String msg = "Error occurred when dleting lifecycle data for application release UUID: " + releaseUuid;
|
|
|
|
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1326,7 +1326,6 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
|
|
|
|
ApplicationReleaseDTO applicationReleaseDTO;
|
|
|
|
ApplicationReleaseDTO applicationReleaseDTO;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
applicationReleaseDTO = this.applicationReleaseDAO.getReleaseByUUID(uuid, tenantId);
|
|
|
|
applicationReleaseDTO = this.applicationReleaseDAO.getReleaseByUUID(uuid, tenantId);
|
|
|
|
if (applicationReleaseDTO == null) {
|
|
|
|
if (applicationReleaseDTO == null) {
|
|
|
@ -1356,24 +1355,24 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occured when getting DB connection to update image artifacts of the application release "
|
|
|
|
"Error occured when getting DB connection to update image artifacts of the application release "
|
|
|
|
+ "which has uuid " + uuid;
|
|
|
|
+ "which has uuid " + uuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when updating application release image artifacts which has "
|
|
|
|
String msg = "Database access error is occurred when updating application release image artifacts which has "
|
|
|
|
+ "UUID: " + uuid;
|
|
|
|
+ "UUID: " + uuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
}catch (ApplicationManagementDAOException e) {
|
|
|
|
}catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occured while getting application release data for updating image artifacts of the application release uuid "
|
|
|
|
"Error occured while getting application release data for updating image artifacts of the application release uuid "
|
|
|
|
+ uuid + ".";
|
|
|
|
+ uuid + ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured while updating image artifacts of the application release uuid " + uuid + ".";
|
|
|
|
String msg = "Error occured while updating image artifacts of the application release uuid " + uuid + ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg , e);
|
|
|
|
throw new ApplicationManagementException(msg , e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1403,7 +1402,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (DeviceManagementException e) {
|
|
|
|
} catch (DeviceManagementException e) {
|
|
|
|
String msg = "Error occured while getting supported device types in IoTS";
|
|
|
|
String msg = "Error occured while getting supported device types in IoTS";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1445,26 +1444,27 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured while getting/updating APPM DB for updating application Installer.";
|
|
|
|
String msg = "Error occured while getting/updating APPM DB for updating application Installer.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Error occured while starting the transaction to update application release artifact which has "
|
|
|
|
String msg = "Error occured while starting the transaction to update application release artifact which has "
|
|
|
|
+ "application uuid " + releaseUuid + ".";
|
|
|
|
+ "application uuid " + releaseUuid + ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occured when getting DB connection to update application release artifact of the "
|
|
|
|
String msg = "Error occured when getting DB connection to update application release artifact of the "
|
|
|
|
+ "application release uuid " + releaseUuid + ".";
|
|
|
|
+ "application release uuid " + releaseUuid + ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
} catch (ApplicationStorageManagementException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
throw new ApplicationManagementException("In order to update the artifact, couldn't find it in the system",
|
|
|
|
String msg = "In order to update the artifact, couldn't find it in the system";
|
|
|
|
e);
|
|
|
|
log.error(msg, e);
|
|
|
|
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured when updating application installer.";
|
|
|
|
String msg = "Error occured when updating application installer.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1487,16 +1487,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get lifecycle state change flow for "
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get lifecycle state change flow for "
|
|
|
|
+ "application release which has UUID: " + releaseUuid;
|
|
|
|
+ "application release which has UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
} catch (LifeCycleManagementDAOException e) {
|
|
|
|
String msg = "Failed to get lifecycle state for application release uuid " + releaseUuid;
|
|
|
|
String msg = "Failed to get lifecycle state for application release uuid " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occurred while getting application release for application release UUID: " + releaseUuid;
|
|
|
|
"Error occurred while getting application release for application release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1560,24 +1560,24 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to change lifecycle state of the "
|
|
|
|
String msg = "Error occurred while getting the database connection to change lifecycle state of the "
|
|
|
|
+ "application release which has UUID:" + releaseUuid;
|
|
|
|
+ "application release which has UUID:" + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when changing lifecycle state of application release which "
|
|
|
|
String msg = "Database access error is occurred when changing lifecycle state of application release which "
|
|
|
|
+ "has UUID: " + releaseUuid;
|
|
|
|
+ "has UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
}catch (LifeCycleManagementDAOException e) {
|
|
|
|
}catch (LifeCycleManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Failed to add lifecycle state for Application release UUID: " + releaseUuid;
|
|
|
|
String msg = "Failed to add lifecycle state for Application release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred when accessing application release data of application release which has the "
|
|
|
|
String msg = "Error occurred when accessing application release data of application release which has the "
|
|
|
|
+ "application release UUID: " + releaseUuid;
|
|
|
|
+ "application release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1598,16 +1598,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to add application categories.";
|
|
|
|
String msg = "Error occurred while getting the database connection to add application categories.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when adding application categories.";
|
|
|
|
String msg = "Database access error is occurred when adding application categories.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured when getting existing categories or when inserting new application categories.";
|
|
|
|
String msg = "Error occured when getting existing categories or when inserting new application categories.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1763,27 +1763,28 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while checking whether logged in user is ADMIN or not when updating "
|
|
|
|
String msg = "Error occurred while checking whether logged in user is ADMIN or not when updating "
|
|
|
|
+ "application of application id: " + applicationId;
|
|
|
|
+ "application of application id: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while updating the application, application id: " + applicationId;
|
|
|
|
String msg = "Error occurred while updating the application, application id: " + applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (VisibilityManagementDAOException e) {
|
|
|
|
} catch (VisibilityManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while updating the visibility restriction of the application. Application id: "
|
|
|
|
String msg = "Error occurred while updating the visibility restriction of the application. Application id: "
|
|
|
|
+ applicationId;
|
|
|
|
+ applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Error occurred while starting database transaction for application updating. Application id: "
|
|
|
|
String msg = "Error occurred while starting database transaction for application updating. Application id: "
|
|
|
|
+ applicationId;
|
|
|
|
+ applicationId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting database connection for application updating. Application id: "
|
|
|
|
String msg = "Error occurred while getting database connection for application updating. Application id: "
|
|
|
|
+ applicationId;
|
|
|
|
+ applicationId;
|
|
|
|
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1809,11 +1810,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
return responseTagList;
|
|
|
|
return responseTagList;
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get registered tags";
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get registered tags";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting registered tags from the system.";
|
|
|
|
String msg = "Error occurred when getting registered tags from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1839,11 +1840,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
return responseCategoryList;
|
|
|
|
return responseCategoryList;
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get registered categories.";
|
|
|
|
String msg = "Error occurred while obtaining the database connection to get registered categories.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting registered tags from the system.";
|
|
|
|
String msg = "Error occurred when getting registered tags from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1872,15 +1873,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to delete application tag.";
|
|
|
|
String msg = "Error occurred while getting the database connection to delete application tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when deleting application tag.";
|
|
|
|
String msg = "Database access error is occurred when deleting application tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting tag Id or deleting tag mapping from the system.";
|
|
|
|
String msg = "Error occurred when getting tag Id or deleting tag mapping from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1905,15 +1906,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to delete registered tag.";
|
|
|
|
String msg = "Error occurred while getting the database connection to delete registered tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when deleting registered tag.";
|
|
|
|
String msg = "Database access error is occurred when deleting registered tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting tag Id or deleting the tag from the system.";
|
|
|
|
String msg = "Error occurred when getting tag Id or deleting the tag from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1942,15 +1943,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to delete unused tag.";
|
|
|
|
String msg = "Error occurred while getting the database connection to delete unused tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when deleting unused tag.";
|
|
|
|
String msg = "Database access error is occurred when deleting unused tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting tag Ids or deleting the tag from the system.";
|
|
|
|
String msg = "Error occurred when getting tag Ids or deleting the tag from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -1974,7 +1975,6 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
+ oldTagName + " to new tag name " + newTagName;
|
|
|
|
+ oldTagName + " to new tag name " + newTagName;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg);
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
throw new BadRequestException(msg);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TagDTO tag = applicationDAO.getTagForTagName(oldTagName, tenantId);
|
|
|
|
TagDTO tag = applicationDAO.getTagForTagName(oldTagName, tenantId);
|
|
|
|
if (tag == null){
|
|
|
|
if (tag == null){
|
|
|
@ -1987,15 +1987,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to update application tag.";
|
|
|
|
String msg = "Error occurred while getting the database connection to update application tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when updating application tag.";
|
|
|
|
String msg = "Database access error is occurred when updating application tag.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting tag Ids or deleting the tag from the system.";
|
|
|
|
String msg = "Error occurred when getting tag Ids or deleting the tag from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2029,16 +2029,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to add tags.";
|
|
|
|
String msg = "Error occurred while getting the database connection to add tags.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when adding tags.";
|
|
|
|
String msg = "Database access error is occurred when adding tags.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred either getting registered tags or adding new tags.";
|
|
|
|
String msg = "Error occurred either getting registered tags or adding new tags.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2081,16 +2081,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to add application tags.";
|
|
|
|
String msg = "Error occurred while getting the database connection to add application tags.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when adding application tags.";
|
|
|
|
String msg = "Database access error is occurred when adding application tags.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred while accessing application tags. Application ID: " + appId;
|
|
|
|
String msg = "Error occurred while accessing application tags. Application ID: " + appId;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2124,16 +2124,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to add categories.";
|
|
|
|
String msg = "Error occurred while getting the database connection to add categories.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when adding categories.";
|
|
|
|
String msg = "Database access error is occurred when adding categories.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occurred either getting registered categories or adding new categories.";
|
|
|
|
String msg = "Error occurred either getting registered categories or adding new categories.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2161,15 +2161,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to delete category.";
|
|
|
|
String msg = "Error occurred while getting the database connection to delete category.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when deleting category.";
|
|
|
|
String msg = "Database access error is occurred when deleting category.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting category Id or deleting the category from the system.";
|
|
|
|
String msg = "Error occurred when getting category Id or deleting the category from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2192,15 +2192,15 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to update category.";
|
|
|
|
String msg = "Error occurred while getting the database connection to update category.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when updating categiry.";
|
|
|
|
String msg = "Database access error is occurred when updating categiry.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred when getting tag Ids or deleting the category from the system.";
|
|
|
|
String msg = "Error occurred when getting tag Ids or deleting the category from the system.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2338,22 +2338,22 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to update enterprise app release which "
|
|
|
|
String msg = "Error occurred while getting the database connection to update enterprise app release which "
|
|
|
|
+ "has release UUID: " + releaseUuid;
|
|
|
|
+ "has release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when updating enterprise app release which has release UUID: "
|
|
|
|
String msg = "Database access error is occurred when updating enterprise app release which has release UUID: "
|
|
|
|
+ releaseUuid;
|
|
|
|
+ releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured when updating Ent Application release of UUID: " + releaseUuid;
|
|
|
|
String msg = "Error occured when updating Ent Application release of UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
String msg = "Error occured when updating application release artifact in the file system. Ent App release "
|
|
|
|
String msg = "Error occured when updating application release artifact in the file system. Ent App release "
|
|
|
|
+ "UUID:" + releaseUuid;
|
|
|
|
+ "UUID:" + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2406,22 +2406,22 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to update public app release which "
|
|
|
|
String msg = "Error occurred while getting the database connection to update public app release which "
|
|
|
|
+ "has release UUID: " + releaseUuid;
|
|
|
|
+ "has release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when updating public app release which has release UUID:."
|
|
|
|
String msg = "Database access error is occurred when updating public app release which has release UUID:."
|
|
|
|
+ releaseUuid;
|
|
|
|
+ releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured when updating public app release of UUID: " + releaseUuid;
|
|
|
|
String msg = "Error occured when updating public app release of UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
String msg = "Error occured when updating public app release artifact in the file system. Public app "
|
|
|
|
String msg = "Error occured when updating public app release artifact in the file system. Public app "
|
|
|
|
+ "release UUID:" + releaseUuid;
|
|
|
|
+ "release UUID:" + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2470,30 +2470,30 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting the database connection to update web app release which "
|
|
|
|
String msg = "Error occurred while getting the database connection to update web app release which "
|
|
|
|
+ "has release UUID: " + releaseUuid;
|
|
|
|
+ "has release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Database access error is occurred when updating web app release which has release UUID:."
|
|
|
|
String msg = "Database access error is occurred when updating web app release which has release UUID:."
|
|
|
|
+ releaseUuid;
|
|
|
|
+ releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
ConnectionManagerUtil.rollbackDBTransaction();
|
|
|
|
String msg = "Error occured when updating web app release for web app Release UUID: " + releaseUuid;
|
|
|
|
String msg = "Error occured when updating web app release for web app Release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
} catch (ResourceManagementException e) {
|
|
|
|
String msg = "Error occured when updating web app release artifact in the file system. Web app "
|
|
|
|
String msg = "Error occured when updating web app release artifact in the file system. Web app "
|
|
|
|
+ "release UUID:" + releaseUuid;
|
|
|
|
+ "release UUID:" + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void validateAppReleaseUpdating(ApplicationDTO applicationDTO, String appType) throws ApplicationManagementException {
|
|
|
|
private void validateAppReleaseUpdating(ApplicationDTO applicationDTO, String appType)
|
|
|
|
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
if (applicationDTO == null) {
|
|
|
|
if (applicationDTO == null) {
|
|
|
|
String msg = "Couldn't found an application for requested UUID.";
|
|
|
|
String msg = "Couldn't found an application for requested UUID.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg);
|
|
|
@ -2721,16 +2721,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while getting database connection.";
|
|
|
|
String msg = "Error occurred while getting database connection.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg =
|
|
|
|
String msg =
|
|
|
|
"Error occurred while getting data which is related to web clip. web clip name: " + appName + ".";
|
|
|
|
"Error occurred while getting data which is related to web clip. web clip name: " + appName + ".";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
} catch (UserStoreException e) {
|
|
|
|
String msg = "Error occurred when validating the unrestricted roles given for the web clip";
|
|
|
|
String msg = "Error occurred when validating the unrestricted roles given for the web clip";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2843,16 +2843,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occured while updating app subscription status of the device.";
|
|
|
|
String msg = "Error occured while updating app subscription status of the device.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obersving the database connection to update aoo subscription status of "
|
|
|
|
String msg = "Error occurred while obersving the database connection to update aoo subscription status of "
|
|
|
|
+ "device.";
|
|
|
|
+ "device.";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Error occurred while executing database transaction";
|
|
|
|
String msg = "Error occurred while executing database transaction";
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
@ -2893,11 +2893,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
} catch (DBConnectionException e) {
|
|
|
|
String msg = "Error occurred while obtaining the database connection for getting application for the release UUID: "
|
|
|
|
String msg = "Error occurred while obtaining the database connection for getting application for the release UUID: "
|
|
|
|
+ releaseUuid;
|
|
|
|
+ releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
} catch (ApplicationManagementDAOException e) {
|
|
|
|
String msg = "Error occurred while getting application data for release UUID: " + releaseUuid;
|
|
|
|
String msg = "Error occurred while getting application data for release UUID: " + releaseUuid;
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
throw new ApplicationManagementException(msg, e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|
ConnectionManagerUtil.closeDBConnection();
|
|
|
|