Fixing connection issue, dao layer fixes

feature/appm-store/pbac
inoshperera 6 years ago
parent d9d0d0a5b8
commit a3b8cef1a2

@ -68,9 +68,11 @@ public interface ApplicationManager {
* *
* @param applicationId ID of tha application * @param applicationId ID of tha application
* @param releaseUuid UUID of tha application release * @param releaseUuid UUID of tha application release
* @param handleConnections Whether it is necessary handle DB connections.
* @throws ApplicationManagementException Application Management Exception * @throws ApplicationManagementException Application Management Exception
*/ */
String deleteApplicationRelease(int applicationId, String releaseUuid) throws ApplicationManagementException; String deleteApplicationRelease(int applicationId, String releaseUuid, boolean handleConnections) throws
ApplicationManagementException;
/** /**
* To get the applications based on the search filter. * To get the applications based on the search filter.
@ -156,9 +158,11 @@ public interface ApplicationManager {
* @param releaseUuid UUID of the Application Release. * @param releaseUuid UUID of the Application Release.
* @param state Lifecycle state to change the app * @param state Lifecycle state to change the app
* @param checkExist whether it is needed to check if the app and release already exist in the database * @param checkExist whether it is needed to check if the app and release already exist in the database
* @param handleDBConnections Whether it is necessary to open connections
* @throws ApplicationManagementException Application Management Exception. * @throws ApplicationManagementException Application Management Exception.
*/ */
void changeLifecycleState(int applicationId, String releaseUuid, LifecycleState state, Boolean checkExist) void changeLifecycleState(int applicationId, String releaseUuid, LifecycleState state, Boolean checkExist,
Boolean handleDBConnections)
throws ApplicationManagementException; throws ApplicationManagementException;
/** /**

@ -57,9 +57,10 @@ public class GenericApplicationReleaseDAOImpl extends AbstractDAOImpl implements
PreparedStatement statement = null; PreparedStatement statement = null;
ResultSet resultSet = null; ResultSet resultSet = null;
String sql = "INSERT INTO AP_APP_RELEASE (VERSION,TENANT_ID,UUID,RELEASE_TYPE, PACKAGE_NAME, APP_PRICE," String sql = "INSERT INTO AP_APP_RELEASE (VERSION,TENANT_ID,UUID,RELEASE_TYPE, PACKAGE_NAME, APP_PRICE, "
+ "STORED_LOCATION, BANNER_LOCATION, SC_1_LOCATION,SC_2_LOCATION,SC_3_LOCATION, APP_HASH_VALUE," + "STORED_LOCATION, ICON_LOCATION, BANNER_LOCATION, SC_1_LOCATION,SC_2_LOCATION,SC_3_LOCATION,"
+ "SHARED_WITH_ALL_TENANTS, APP_META_INFO,AP_APP_ID) " + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);"; + "APP_HASH_VALUE, SHARED_WITH_ALL_TENANTS, APP_META_INFO,AP_APP_ID) "
+ "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
int index = 0; int index = 0;
String generatedColumns[] = { "ID" }; String generatedColumns[] = { "ID" };
@ -117,7 +118,8 @@ public class GenericApplicationReleaseDAOImpl extends AbstractDAOImpl implements
ResultSet resultSet = null; ResultSet resultSet = null;
String sql = "SELECT AR.ID AS RELEASE_ID, AR.VERSION AS RELEASE_VERSION, AR.UUID AS UUID, AR.RELEASE_TYPE AS " String sql = "SELECT AR.ID AS RELEASE_ID, AR.VERSION AS RELEASE_VERSION, AR.UUID AS UUID, AR.RELEASE_TYPE AS "
+ "RELEASE_TYPE, AR.PACKAGE_NAME AS PACKAGE_NAME, AR.APP_PRICE AS APP_PRICE, AR.STORED_LOCATION AS " + "RELEASE_TYPE, AR.PACKAGE_NAME AS PACKAGE_NAME, AR.APP_PRICE AS APP_PRICE, AR.STORED_LOCATION AS "
+ "STORED_LOCATION, AR.BANNER_LOCATION AS BANNER_LOCATION, AR.SC_1_LOCATION AS SCREEN_SHOT_1, " + "STORED_LOCATION, AR.BANNER_LOCATION AS BANNER_LOCATION, ICON_LOCATION, AR.SC_1_LOCATION AS " +
"SCREEN_SHOT_1, "
+ "AR.SC_2_LOCATION AS SCREEN_SHOT_2, AR.SC_3_LOCATION AS SCREEN_SHOT_3, AR.APP_HASH_VALUE AS " + "AR.SC_2_LOCATION AS SCREEN_SHOT_2, AR.SC_3_LOCATION AS SCREEN_SHOT_3, AR.APP_HASH_VALUE AS "
+ "HASH_VALUE, AR.SHARED_WITH_ALL_TENANTS AS SHARED, AR.APP_META_INFO AS APP_META_INFO , " + "HASH_VALUE, AR.SHARED_WITH_ALL_TENANTS AS SHARED, AR.APP_META_INFO AS APP_META_INFO , "
+ "AR.RATING AS RATING, AL.CURRENT_STATE, AL.PREVIOUS_STATE, AL.UPDATED_BY, AL.UPDATED_AT FROM " + "AR.RATING AS RATING, AL.CURRENT_STATE, AL.PREVIOUS_STATE, AL.UPDATED_BY, AL.UPDATED_AT FROM "
@ -166,7 +168,7 @@ public class GenericApplicationReleaseDAOImpl extends AbstractDAOImpl implements
ResultSet resultSet = null; ResultSet resultSet = null;
String sql = String sql =
"SELECT AR.ID AS RELEASE_ID, AR.VERSION AS RELEASE_VERSION, AR.UUID, AR.RELEASE_TYPE, AR.APP_PRICE, " "SELECT AR.ID AS RELEASE_ID, AR.VERSION AS RELEASE_VERSION, AR.UUID, AR.RELEASE_TYPE, AR.APP_PRICE, "
+ "AR.STORED_LOCATION, AR.BANNER_LOCATION, AR.SC_1_LOCATION AS SCREEN_SHOT_1, " + "AR.STORED_LOCATION, AR.BANNER_LOCATION, AR.SC_1_LOCATION AS SCREEN_SHOT_1, ICON_LOCATION,"
+ "AR.SC_2_LOCATION AS SCREEN_SHOT_2, AR.SC_3_LOCATION AS SCREEN_SHOT_3, AR.PACKAGE_NAME AS " + "AR.SC_2_LOCATION AS SCREEN_SHOT_2, AR.SC_3_LOCATION AS SCREEN_SHOT_3, AR.PACKAGE_NAME AS "
+ "PACKAGE_NAME, AR.APP_HASH_VALUE AS HASH_VALUE, AR.SHARED_WITH_ALL_TENANTS AS SHARED, " + "PACKAGE_NAME, AR.APP_HASH_VALUE AS HASH_VALUE, AR.SHARED_WITH_ALL_TENANTS AS SHARED, "
+ "AR.APP_META_INFO AS APP_META_INFO, AR.RATING AS RATING, AL.CURRENT_STATE, AL.PREVIOUS_STATE, " + "AR.APP_META_INFO AS APP_META_INFO, AR.RATING AS RATING, AL.CURRENT_STATE, AL.PREVIOUS_STATE, "
@ -213,7 +215,7 @@ public class GenericApplicationReleaseDAOImpl extends AbstractDAOImpl implements
ResultSet resultSet = null; ResultSet resultSet = null;
List<ApplicationRelease> applicationReleases = new ArrayList<>(); List<ApplicationRelease> applicationReleases = new ArrayList<>();
String sql = "SELECT AR.ID AS RELEASE_ID, AR.VERSION AS RELEASE_VERSION, AR.UUID, AR.RELEASE_TYPE " String sql = "SELECT AR.ID AS RELEASE_ID, AR.VERSION AS RELEASE_VERSION, AR.UUID, AR.RELEASE_TYPE "
+ "AS RELEASE_TYPE, AR.PACKAGE_NAME AS PACKAGE_NAME, AR.APP_PRICE, AR.STORED_LOCATION, " + "AS RELEASE_TYPE, AR.PACKAGE_NAME AS PACKAGE_NAME, AR.APP_PRICE, AR.STORED_LOCATION, ICON_LOCATION"
+ "AR.BANNER_LOCATION, AR.SC_1_LOCATION AS SCREEN_SHOT_1, AR.SC_2_LOCATION AS SCREEN_SHOT_2, " + "AR.BANNER_LOCATION, AR.SC_1_LOCATION AS SCREEN_SHOT_1, AR.SC_2_LOCATION AS SCREEN_SHOT_2, "
+ "AR.SC_3_LOCATION AS SCREEN_SHOT_3, AR.APP_HASH_VALUE AS HASH_VALUE, " + "AR.SC_3_LOCATION AS SCREEN_SHOT_3, AR.APP_HASH_VALUE AS HASH_VALUE, "
+ "AR.SHARED_WITH_ALL_TENANTS AS SHARED, AR.APP_META_INFO AS APP_META_INFO, " + "AR.SHARED_WITH_ALL_TENANTS AS SHARED, AR.APP_META_INFO AS APP_META_INFO, "
@ -361,7 +363,8 @@ public class GenericApplicationReleaseDAOImpl extends AbstractDAOImpl implements
Connection connection; Connection connection;
PreparedStatement statement = null; PreparedStatement statement = null;
String sql = "UPDATE AP_APP_RELEASE SET VERSION = ?, UUID = ?, RELEASE_TYPE = ?, PACKAGE_NAME = ?," String sql = "UPDATE AP_APP_RELEASE SET VERSION = ?, UUID = ?, RELEASE_TYPE = ?, PACKAGE_NAME = ?,"
+ " APP_PRICE = ?, STORED_LOCATION = ?, BANNER_LOCATION = ?, SC_1_LOCATION = ?, SC_2_LOCATION = ?," + " APP_PRICE = ?, STORED_LOCATION = ?, BANNER_LOCATION = ?, ICON_LOCATION =?, SC_1_LOCATION = ?, " +
"SC_2_LOCATION = ?,"
+ " SC_3_LOCATION = ?, APP_HASH_VALUE = ?, SHARED_WITH_ALL_TENANTS = ?, APP_META_INFO = ? " + " SC_3_LOCATION = ?, APP_HASH_VALUE = ?, SHARED_WITH_ALL_TENANTS = ?, APP_META_INFO = ? "
+ "WHERE AP_APP_ID = ? AND TENANT_ID = ? AND ID = ?;"; + "WHERE AP_APP_ID = ? AND TENANT_ID = ? AND ID = ?;";
try { try {
@ -374,15 +377,16 @@ public class GenericApplicationReleaseDAOImpl extends AbstractDAOImpl implements
statement.setDouble(5, applicationRelease.getPrice()); statement.setDouble(5, applicationRelease.getPrice());
statement.setString(6, applicationRelease.getAppStoredLoc()); statement.setString(6, applicationRelease.getAppStoredLoc());
statement.setString(7, applicationRelease.getBannerLoc()); statement.setString(7, applicationRelease.getBannerLoc());
statement.setString(8, applicationRelease.getScreenshotLoc1()); statement.setString(8, applicationRelease.getIconLoc());
statement.setString(9, applicationRelease.getScreenshotLoc2()); statement.setString(9, applicationRelease.getScreenshotLoc1());
statement.setString(10, applicationRelease.getScreenshotLoc3()); statement.setString(10, applicationRelease.getScreenshotLoc2());
statement.setString(11, applicationRelease.getAppHashValue()); statement.setString(11, applicationRelease.getScreenshotLoc3());
statement.setInt(12, applicationRelease.getIsSharedWithAllTenants()); statement.setString(12, applicationRelease.getAppHashValue());
statement.setString(13, applicationRelease.getMetaData()); statement.setInt(13, applicationRelease.getIsSharedWithAllTenants());
statement.setInt(14, applicationId); statement.setString(14, applicationRelease.getMetaData());
statement.setInt(15, tenantId); statement.setInt(15, applicationId);
statement.setInt(16, applicationRelease.getId()); statement.setInt(16, tenantId);
statement.setInt(17, applicationRelease.getId());
statement.executeUpdate(); statement.executeUpdate();
} catch (DBConnectionException e) { } catch (DBConnectionException e) {
throw new ApplicationManagementDAOException( throw new ApplicationManagementDAOException(

@ -166,7 +166,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
LifecycleState lifecycleState = new LifecycleState(); LifecycleState lifecycleState = new LifecycleState();
lifecycleState.setCurrentState(AppLifecycleState.CREATED.toString()); lifecycleState.setCurrentState(AppLifecycleState.CREATED.toString());
lifecycleState.setPreviousState(AppLifecycleState.CREATED.toString()); lifecycleState.setPreviousState(AppLifecycleState.CREATED.toString());
changeLifecycleState(appId, applicationRelease.getUuid(), lifecycleState, false); changeLifecycleState(appId, applicationRelease.getUuid(), lifecycleState, false, false);
applicationRelease.setLifecycleState(lifecycleState); applicationRelease.setLifecycleState(lifecycleState);
applicationReleases.add(applicationRelease); applicationReleases.add(applicationRelease);
@ -244,18 +244,16 @@ public class ApplicationManagerImpl implements ApplicationManager {
log.debug("Application release request is received for the application " + application.toString()); log.debug("Application release request is received for the application " + application.toString());
} }
try { try {
ConnectionManagerUtil.beginDBTransaction(); ConnectionManagerUtil.getDBConnection();
applicationRelease = this.applicationReleaseDAO applicationRelease = this.applicationReleaseDAO
.createRelease(applicationRelease, application.getId(), tenantId); .createRelease(applicationRelease, application.getId(), tenantId);
LifecycleState lifecycleState = new LifecycleState(); LifecycleState lifecycleState = new LifecycleState();
lifecycleState.setCurrentState(AppLifecycleState.CREATED.toString()); lifecycleState.setCurrentState(AppLifecycleState.CREATED.toString());
lifecycleState.setPreviousState(AppLifecycleState.CREATED.toString()); lifecycleState.setPreviousState(AppLifecycleState.CREATED.toString());
changeLifecycleState(application.getId(), applicationRelease.getUuid(), lifecycleState, true); changeLifecycleState(application.getId(), applicationRelease.getUuid(), lifecycleState, true,
false);
ConnectionManagerUtil.commitDBTransaction();
return applicationRelease; return applicationRelease;
} catch (ApplicationManagementDAOException e) { } catch (ApplicationManagementDAOException e) {
ConnectionManagerUtil.rollbackDBTransaction();
throw new ApplicationManagementException( throw new ApplicationManagementException(
"Error occurred while adding application release into IoTS app management Application id of the " "Error occurred while adding application release into IoTS app management Application id of the "
+ "application release: " + applicationId, e); + "application release: " + applicationId, e);
@ -502,7 +500,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
"You don't have permission to delete this application. In order to delete an application you " + "You don't have permission to delete this application. In order to delete an application you " +
"need to have admin permission"); "need to have admin permission");
} }
ConnectionManagerUtil.openDBConnection();
application = getApplicationIfAccessible(applicationId); application = getApplicationIfAccessible(applicationId);
if ( application == null) { if ( application == null) {
throw new ApplicationManagementException("Invalid Application"); throw new ApplicationManagementException("Invalid Application");
@ -512,16 +510,17 @@ public class ApplicationManagerImpl implements ApplicationManager {
log.debug("Request is received to delete applications which are related with the application id " + log.debug("Request is received to delete applications which are related with the application id " +
applicationId); applicationId);
} }
ConnectionManagerUtil.beginDBTransaction();
for (ApplicationRelease applicationRelease : applicationReleases) { for (ApplicationRelease applicationRelease : applicationReleases) {
LifecycleState appLifecycleState = getLifecycleState(applicationId, applicationRelease.getUuid()); LifecycleState appLifecycleState = getLifecycleState(applicationId, applicationRelease.getUuid());
LifecycleState newAppLifecycleState = new LifecycleState(); LifecycleState newAppLifecycleState = new LifecycleState();
newAppLifecycleState.setPreviousState(appLifecycleState.getCurrentState()); newAppLifecycleState.setPreviousState(appLifecycleState.getCurrentState());
newAppLifecycleState.setCurrentState(AppLifecycleState.REMOVED.toString()); newAppLifecycleState.setCurrentState(AppLifecycleState.REMOVED.toString());
changeLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState, true); changeLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState, true, false);
storedLocations.add(applicationRelease.getAppHashValue()); storedLocations.add(applicationRelease.getAppHashValue());
} }
ConnectionManagerUtil.openDBConnection();
this.applicationDAO.deleteApplication(applicationId); this.applicationDAO.deleteApplication(applicationId);
ConnectionManagerUtil.commitDBTransaction();
} catch (UserStoreException e) { } catch (UserStoreException e) {
String msg = "Error occured while check whether current user has the permission to delete an application"; String msg = "Error occured while check whether current user has the permission to delete an application";
log.error(msg); log.error(msg);
@ -533,28 +532,37 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
@Override @Override
public String deleteApplicationRelease(int applicationId, String releaseUuid) public String deleteApplicationRelease(int applicationId, String releaseUuid, boolean handleConnections)
throws ApplicationManagementException { throws ApplicationManagementException {
Application application = getApplicationIfAccessible(applicationId); Application application = getApplicationIfAccessible(applicationId);
if (application == null) { if (application == null) {
throw new ApplicationManagementException("Invalid Application ID is received"); throw new ApplicationManagementException("Invalid Application ID is received");
} }
ApplicationRelease applicationRelease = getAppReleaseIfExists(applicationId, releaseUuid); if (handleConnections) {
LifecycleState appLifecycleState = getLifecycleState(applicationId, applicationRelease.getUuid()); ConnectionManagerUtil.openDBConnection();
String currentState = appLifecycleState.getCurrentState(); }
if (AppLifecycleState.DEPRECATED.toString().equals(currentState) || AppLifecycleState try {
.REJECTED.toString().equals(currentState) || AppLifecycleState.UNPUBLISHED.toString().equals ApplicationRelease applicationRelease = getAppReleaseIfExists(applicationId, releaseUuid);
(currentState) ) { LifecycleState appLifecycleState = getLifecycleState(applicationId, applicationRelease.getUuid());
LifecycleState newAppLifecycleState = new LifecycleState(); String currentState = appLifecycleState.getCurrentState();
newAppLifecycleState.setPreviousState(appLifecycleState.getCurrentState()); if (AppLifecycleState.DEPRECATED.toString().equals(currentState) || AppLifecycleState
newAppLifecycleState.setCurrentState(AppLifecycleState.REMOVED.toString()); .REJECTED.toString().equals(currentState) || AppLifecycleState.UNPUBLISHED.toString().equals
changeLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState, true); (currentState)) {
}else{ LifecycleState newAppLifecycleState = new LifecycleState();
throw new ApplicationManagementException("Can't delete the application release, You have to move the " + newAppLifecycleState.setPreviousState(appLifecycleState.getCurrentState());
"lifecycle state from "+ currentState + " to acceptable " + newAppLifecycleState.setCurrentState(AppLifecycleState.REMOVED.toString());
"state") ; changeLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState, true, false);
} else {
throw new ApplicationManagementException("Can't delete the application release, You have to move the " +
"lifecycle state from " + currentState + " to acceptable " +
"state");
}
return applicationRelease.getAppHashValue();
} finally {
if (handleConnections) {
ConnectionManagerUtil.closeDBConnection();
}
} }
return applicationRelease.getAppHashValue();
} }
/** /**
@ -856,12 +864,14 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
@Override @Override
public void changeLifecycleState(int applicationId, String releaseUuid, LifecycleState state, Boolean checkExist) public void changeLifecycleState(int applicationId, String releaseUuid, LifecycleState state, Boolean checkExist,
throws ApplicationManagementException { Boolean handleDBConnections) throws ApplicationManagementException {
try { try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
if (checkExist) { if (checkExist) {
ConnectionManagerUtil.openDBConnection(); if (handleDBConnections) {
ConnectionManagerUtil.openDBConnection();
}
if (!this.applicationDAO.verifyApplicationExistenceById(applicationId, tenantId)){ if (!this.applicationDAO.verifyApplicationExistenceById(applicationId, tenantId)){
throw new NotFoundException( throw new NotFoundException(
"Couldn't found application for the application Id: " + applicationId); "Couldn't found application for the application Id: " + applicationId);
@ -879,11 +889,9 @@ public class ApplicationManagerImpl implements ApplicationManager {
if (state.getCurrentState() != null && state.getPreviousState() != null) { if (state.getCurrentState() != null && state.getPreviousState() != null) {
if (getLifecycleManagementService() if (getLifecycleManagementService()
.isValidStateChange(state.getPreviousState(), state.getCurrentState())) { .isValidStateChange(state.getPreviousState(), state.getCurrentState())) {
ConnectionManagerUtil.beginDBTransaction();
//todo if current state of the adding lifecycle state is PUBLISHED, need to check whether is there //todo if current state of the adding lifecycle state is PUBLISHED, need to check whether is there
//todo any other application release in PUBLISHED state for the application( i.e for the appid) //todo any other application release in PUBLISHED state for the application( i.e for the appid)
this.lifecycleStateDAO.addLifecycleState(state, applicationId, releaseUuid, tenantId); this.lifecycleStateDAO.addLifecycleState(state, applicationId, releaseUuid, tenantId);
ConnectionManagerUtil.commitDBTransaction();
} else { } else {
log.error("Invalid lifecycle state transition from '" + state.getPreviousState() + "'" + " to '" log.error("Invalid lifecycle state transition from '" + state.getPreviousState() + "'" + " to '"
+ state.getCurrentState() + "'"); + state.getCurrentState() + "'");
@ -892,12 +900,13 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
} }
} catch (LifeCycleManagementDAOException e) { } catch (LifeCycleManagementDAOException e) {
ConnectionManagerUtil.rollbackDBTransaction();
throw new ApplicationManagementException( throw new ApplicationManagementException(
"Failed to add lifecycle state. Application Id: " + applicationId + " Application release UUID: " "Failed to add lifecycle state. Application Id: " + applicationId + " Application release UUID: "
+ releaseUuid, e); + releaseUuid, e);
} finally { } finally {
ConnectionManagerUtil.closeDBConnection(); if (handleDBConnections) {
ConnectionManagerUtil.closeDBConnection();
}
} }
} }

@ -437,7 +437,7 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
ApplicationManager applicationManager = APIUtil.getApplicationManager(); ApplicationManager applicationManager = APIUtil.getApplicationManager();
ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager(); ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager();
try { try {
String storedLocation = applicationManager.deleteApplicationRelease(applicationId, releaseUuid); String storedLocation = applicationManager.deleteApplicationRelease(applicationId, releaseUuid, true);
applicationStorageManager.deleteApplicationReleaseArtifacts(storedLocation); applicationStorageManager.deleteApplicationReleaseArtifacts(storedLocation);
String responseMsg = "Successfully deleted the application release of: " + applicationId + ""; String responseMsg = "Successfully deleted the application release of: " + applicationId + "";
return Response.status(Response.Status.OK).entity(responseMsg).build(); return Response.status(Response.Status.OK).entity(responseMsg).build();
@ -483,7 +483,7 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
LifecycleState state) { LifecycleState state) {
ApplicationManager applicationManager = APIUtil.getApplicationManager(); ApplicationManager applicationManager = APIUtil.getApplicationManager();
try { try {
applicationManager.changeLifecycleState(applicationId, applicationUuid, state, true); applicationManager.changeLifecycleState(applicationId, applicationUuid, state, true, true);
} catch (NotFoundException e) { } catch (NotFoundException e) {
String msg = "Could,t find application release for application id: " + applicationId String msg = "Could,t find application release for application id: " + applicationId
+ " and application release uuid: " + applicationUuid; + " and application release uuid: " + applicationUuid;

@ -28,6 +28,7 @@ CREATE TABLE IF NOT EXISTS AP_APP_RELEASE (
APP_PRICE DECIMAL(6,2) NULL DEFAULT NULL, APP_PRICE DECIMAL(6,2) NULL DEFAULT NULL,
STORED_LOCATION VARCHAR(100) NOT NULL, STORED_LOCATION VARCHAR(100) NOT NULL,
BANNER_LOCATION VARCHAR(100) NOT NULL, BANNER_LOCATION VARCHAR(100) NOT NULL,
ICON_LOCATION VARCHAR(100) NOT NULL,
SC_1_LOCATION VARCHAR(100) NOT NULL, SC_1_LOCATION VARCHAR(100) NOT NULL,
SC_2_LOCATION VARCHAR(100) NULL DEFAULT NULL, SC_2_LOCATION VARCHAR(100) NULL DEFAULT NULL,
SC_3_LOCATION VARCHAR(100) NULL DEFAULT NULL, SC_3_LOCATION VARCHAR(100) NULL DEFAULT NULL,
@ -73,7 +74,7 @@ CREATE INDEX fk_AP_APP_COMMENT_AP_APP_RELEASE1_idx ON AP_APP_REVIEW (AP_APP_RELE
CREATE TABLE IF NOT EXISTS AP_APP_LIFECYCLE_STATE ( CREATE TABLE IF NOT EXISTS AP_APP_LIFECYCLE_STATE (
ID INT(11) NOT NULL AUTO_INCREMENT, ID INT(11) NOT NULL AUTO_INCREMENT,
CURRENT_STATE VARCHAR(45) NOT NULL, CURRENT_STATE VARCHAR(45) NOT NULL,
PREVIOUSE_STATE VARCHAR(45) NOT NULL, PREVIOUS_STATE VARCHAR(45) NOT NULL,
TENANT_ID VARCHAR(45) NOT NULL, TENANT_ID VARCHAR(45) NOT NULL,
UPDATED_BY VARCHAR(100) NOT NULL, UPDATED_BY VARCHAR(100) NOT NULL,
UPDATED_AT TIMESTAMP NOT NULL, UPDATED_AT TIMESTAMP NOT NULL,

Loading…
Cancel
Save