Merge branch 'application-mgt-new' of https://github.com/lasanthaDLPDS/carbon-device-mgt into application-mgt-new

feature/appm-store/pbac
inoshperera 6 years ago
commit e6f099d43b

@ -51,21 +51,8 @@
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version> <Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>Application Management Common Bundle</Bundle-Description> <Bundle-Description>Application Management Common Bundle</Bundle-Description>
<Import-Package> <Import-Package>
org.osgi.framework,
org.osgi.service.component,
org.apache.commons.logging,
javax.xml.*,
org.apache.commons.codec.binary;version="${commons-codec.wso2.osgi.version.range}",
org.wso2.carbon.device.mgt.core.dto.*;version="${carbon.device.mgt.version}",
org.wso2.carbon.device.mgt.core.dao.*;version="${carbon.device.mgt.version}",
org.wso2.carbon.device.mgt.common.operation.mgt.*;version="${carbon.device.mgt.version}", org.wso2.carbon.device.mgt.common.operation.mgt.*;version="${carbon.device.mgt.version}",
org.w3c.dom,
org.json,
org.xml.sax,
com.google.gson, com.google.gson,
javax.naming,
javax.xml.bind.annotation,
javax.xml.bind,
io.swagger.annotations.*;resolution:=optional io.swagger.annotations.*;resolution:=optional
</Import-Package> </Import-Package>
<Export-Package> <Export-Package>

@ -153,20 +153,20 @@ public interface ApplicationManager {
void addLifecycleState(int applicationId, String applicationUuid, LifecycleState state) throws ApplicationManagementException; void addLifecycleState(int applicationId, String applicationUuid, LifecycleState state) throws ApplicationManagementException;
/** /**
* To validate the application existence for given application id * Get the application if application is an accessible one.
* *
* @param applicationId ID of the Application. * @param applicationId ID of the Application.
* @throws ApplicationManagementException Application Management Exception. * @throws ApplicationManagementException Application Management Exception.
*/ */
Application validateApplication(int applicationId) throws ApplicationManagementException; Application getApplicationIfAccessible(int applicationId) throws ApplicationManagementException;
/** /**
* To validate the application release existence for given application release UUID * Get the application release for given UUID if application release is exists and application id is valid one.
* *
* @param releaseUuid UUID of the Application Release. * @param releaseUuid UUID of the Application Release.
* @throws ApplicationManagementException Application Management Exception. * @throws ApplicationManagementException Application Management Exception.
*/ */
ApplicationRelease validateApplicationRelease(int applicationId, String releaseUuid) throws ApplicationRelease getAppReleaseIfExists(int applicationId, String releaseUuid) throws
ApplicationManagementException; ApplicationManagementException;
/** /**
@ -188,7 +188,7 @@ public interface ApplicationManager {
* @return Updated Application Release. * @return Updated Application Release.
* @throws ApplicationManagementException Application Management Exception. * @throws ApplicationManagementException Application Management Exception.
*/ */
boolean isApplicationReleaseUpdateAcceptable(int appId, String appReleaseUuid) boolean isAcceptableAppReleaseUpdate(int appId, String appReleaseUuid)
throws ApplicationManagementException; throws ApplicationManagementException;
/** /**

@ -57,7 +57,6 @@
org.osgi.framework, org.osgi.framework,
org.osgi.service.component, org.osgi.service.component,
org.apache.commons.logging, org.apache.commons.logging,
javax.xml.*,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
org.wso2.carbon.context.*, org.wso2.carbon.context.*,
org.wso2.carbon.utils.*, org.wso2.carbon.utils.*,
@ -71,35 +70,26 @@
org.wso2.carbon.device.application.mgt.common.*, org.wso2.carbon.device.application.mgt.common.*,
org.wso2.carbon.device.mgt.core.*, org.wso2.carbon.device.mgt.core.*,
org.wso2.carbon.device.mgt.common.*, org.wso2.carbon.device.mgt.common.*,
org.apache.axis2.*,
org.wso2.carbon.user.core.*, org.wso2.carbon.user.core.*,
org.wso2.carbon.user.api.*, org.wso2.carbon.user.api.*,
org.wso2.carbon.ndatasource.core, org.wso2.carbon.ndatasource.core,
org.wso2.carbon, org.wso2.carbon,
javax.annotation, javax.annotation,
org.bouncycastle.cert,
org.bouncycastle.cert.jcajce,
org.bouncycastle.cms,
org.bouncycastle.jce.provider,
org.bouncycastle.util,
org.xml.sax, org.xml.sax,
org.xml.sax.helpers, org.xml.sax.helpers,
org.apache.commons.io, org.apache.commons.io,
org.apache.commons.codec.binary;version="${commons-codec.wso2.osgi.version.range}", org.apache.commons.codec.binary;version="${commons-codec.wso2.osgi.version.range}",
org.apache.commons.codec.digest;version="${commons-codec.wso2.osgi.version.range}", org.apache.commons.codec.digest;version="${commons-codec.wso2.osgi.version.range}",
org.wso2.carbon.base, org.wso2.carbon.base,
org.wso2.carbon.device.mgt.core.dto.*;version="${carbon.device.mgt.version}", net.dongliu.apk.parser.*
org.wso2.carbon.device.mgt.core.dao.*;version="${carbon.device.mgt.version}",
net.dongliu.*
</Import-Package> </Import-Package>
<Embed-Dependency>apk-parser;scope=compile|runtime;inline=false</Embed-Dependency> <Embed-Dependency>apk-parser;scope=compile|runtime;inline=false</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive> <!--<Embed-Transitive>true</Embed-Transitive>-->
<Embed-StripGroup>true</Embed-StripGroup> <!--<Embed-StripGroup>true</Embed-StripGroup>-->
<Export-Package> <Export-Package>
!org.wso2.carbon.device.application.mgt.core.internal.*, !org.wso2.carbon.device.application.mgt.core.internal.*,
org.wso2.carbon.device.application.mgt.core.* org.wso2.carbon.device.application.mgt.core.*
</Export-Package> </Export-Package>
<Axis2Deployer>PlatformDeployer</Axis2Deployer>
</instructions> </instructions>
</configuration> </configuration>
</plugin> </plugin>

@ -40,6 +40,7 @@ import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionExcep
import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException; import org.wso2.carbon.device.application.mgt.common.exception.LifecycleManagementException;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager; import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO; import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
import org.wso2.carbon.device.application.mgt.core.dao.ApplicationReleaseDAO;
import org.wso2.carbon.device.application.mgt.core.dao.LifecycleStateDAO; import org.wso2.carbon.device.application.mgt.core.dao.LifecycleStateDAO;
import org.wso2.carbon.device.application.mgt.core.dao.VisibilityDAO; import org.wso2.carbon.device.application.mgt.core.dao.VisibilityDAO;
import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory; import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
@ -70,6 +71,9 @@ public class ApplicationManagerImpl implements ApplicationManager {
private DeviceTypeDAO deviceTypeDAO; private DeviceTypeDAO deviceTypeDAO;
private VisibilityDAO visibilityDAO; private VisibilityDAO visibilityDAO;
private ApplicationDAO applicationDAO; private ApplicationDAO applicationDAO;
private ApplicationReleaseDAO applicationReleaseDAO;
private LifecycleStateDAO lifecycleStateDAO;
public ApplicationManagerImpl() { public ApplicationManagerImpl() {
initDataAccessObjects(); initDataAccessObjects();
@ -79,6 +83,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
this.deviceTypeDAO = ApplicationManagementDAOFactory.getDeviceTypeDAO(); this.deviceTypeDAO = ApplicationManagementDAOFactory.getDeviceTypeDAO();
this.visibilityDAO = ApplicationManagementDAOFactory.getVisibilityDAO(); this.visibilityDAO = ApplicationManagementDAOFactory.getVisibilityDAO();
this.applicationDAO = ApplicationManagementDAOFactory.getApplicationDAO(); this.applicationDAO = ApplicationManagementDAOFactory.getApplicationDAO();
this.lifecycleStateDAO = ApplicationManagementDAOFactory.getLifecycleStateDAO();
this.applicationReleaseDAO = ApplicationManagementDAOFactory.getApplicationReleaseDAO();
} }
@Override @Override
@ -92,7 +98,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
validateAppCreatingRequest(application); validateAppCreatingRequest(application);
validateReleaseCreatingRequest(application.getApplicationReleases().get(0)); validateAppReleasePayload(application.getApplicationReleases().get(0));
DeviceType deviceType; DeviceType deviceType;
ApplicationRelease applicationRelease; ApplicationRelease applicationRelease;
List<ApplicationRelease> applicationReleases = new ArrayList<>(); List<ApplicationRelease> applicationReleases = new ArrayList<>();
@ -127,16 +133,13 @@ public class ApplicationManagerImpl implements ApplicationManager {
+ "the payload contains more than one"); + "the payload contains more than one");
} }
applicationRelease = application.getApplicationReleases().get(0); applicationRelease = application.getApplicationReleases().get(0);
applicationRelease = ApplicationManagementDAOFactory.getApplicationReleaseDAO(). applicationRelease = this.applicationReleaseDAO
createRelease(applicationRelease, application.getId(), tenantId); .createRelease(applicationRelease, application.getId(), tenantId);
LifecycleState lifecycleState = new LifecycleState(); LifecycleState lifecycleState = new LifecycleState();
lifecycleState.setUpdatedBy(userName);
lifecycleState.setCurrentState(AppLifecycleState.CREATED.toString()); lifecycleState.setCurrentState(AppLifecycleState.CREATED.toString());
lifecycleState.setPreviousState(AppLifecycleState.CREATED.toString()); lifecycleState.setPreviousState(AppLifecycleState.CREATED.toString());
addLifecycleState(application.getId(), applicationRelease.getUuid(), lifecycleState); addLifecycleState(application.getId(), applicationRelease.getUuid(), lifecycleState);
LifecycleStateDAO lifecycleStateDAO = ApplicationManagementDAOFactory.getLifecycleStateDAO();
lifecycleStateDAO.addLifecycleState(lifecycleState, application.getId(), applicationRelease.getId(), tenantId);
applicationRelease.setLifecycleState(lifecycleState); applicationRelease.setLifecycleState(lifecycleState);
applicationReleases.add(applicationRelease); applicationReleases.add(applicationRelease);
@ -157,12 +160,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
log.error(msg, e); log.error(msg, e);
ConnectionManagerUtil.rollbackDBTransaction(); ConnectionManagerUtil.rollbackDBTransaction();
throw new ApplicationManagementException(msg, e); throw new ApplicationManagementException(msg, e);
} catch (LifeCycleManagementDAOException e) { } finally {
String msg = "Error occurred while adding application lifecycle state";
log.error(msg, e);
ConnectionManagerUtil.rollbackDBTransaction();
throw new ApplicationManagementException(msg, e);
}finally {
ConnectionManagerUtil.closeDBConnection(); ConnectionManagerUtil.closeDBConnection();
} }
} }
@ -185,13 +183,10 @@ public class ApplicationManagerImpl implements ApplicationManager {
if (!isAdminUser(userName, tenantId, CarbonConstants.UI_ADMIN_PERMISSION_COLLECTION)) { if (!isAdminUser(userName, tenantId, CarbonConstants.UI_ADMIN_PERMISSION_COLLECTION)) {
applicationList = getRoleRestrictedApplicationList(applicationList, userName); applicationList = getRoleRestrictedApplicationList(applicationList, userName);
} }
for (Application application : applicationList.getApplications()) { for (Application application : applicationList.getApplications()) {
applicationReleases = getReleases(application.getId()); applicationReleases = getReleases(application.getId());
application.setApplicationReleases(applicationReleases); application.setApplicationReleases(applicationReleases);
} }
return applicationList; return applicationList;
} catch (UserStoreException e) { } catch (UserStoreException e) {
throw new ApplicationManagementException( throw new ApplicationManagementException(
@ -206,24 +201,30 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
@Override @Override
public ApplicationRelease createRelease(int applicationId, ApplicationRelease applicationRelease) throws public ApplicationRelease createRelease(int applicationId, ApplicationRelease applicationRelease)
ApplicationManagementException { throws ApplicationManagementException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
Application application = validateApplication(applicationId); Application application = getApplicationIfAccessible(applicationId);
validateReleaseCreatingRequest(applicationRelease); validateAppReleasePayload(applicationRelease);
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
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.beginDBTransaction();
// todo consider about lifecycle adding applicationRelease = this.applicationReleaseDAO
applicationRelease = ApplicationManagementDAOFactory.getApplicationReleaseDAO(). .createRelease(applicationRelease, application.getId(), tenantId);
createRelease(applicationRelease, application.getId(), tenantId); LifecycleState lifecycleState = new LifecycleState();
lifecycleState.setCurrentState(AppLifecycleState.CREATED.toString());
lifecycleState.setPreviousState(AppLifecycleState.CREATED.toString());
addLifecycleState(application.getId(), applicationRelease.getUuid(), lifecycleState);
ConnectionManagerUtil.commitDBTransaction(); ConnectionManagerUtil.commitDBTransaction();
return applicationRelease; return applicationRelease;
} catch (ApplicationManagementDAOException e) { } catch (ApplicationManagementDAOException e) {
ConnectionManagerUtil.rollbackDBTransaction(); ConnectionManagerUtil.rollbackDBTransaction();
throw e; throw new ApplicationManagementException(
"Error occured while adding application release into IoTS app management Application id of the "
+ "application release: " + applicationId, e);
} finally { } finally {
ConnectionManagerUtil.closeDBConnection(); ConnectionManagerUtil.closeDBConnection();
} }
@ -353,7 +354,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
public List<ApplicationRelease> getReleases(int applicationId) throws ApplicationManagementException { public List<ApplicationRelease> getReleases(int applicationId) throws ApplicationManagementException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
Application application = validateApplication(applicationId); Application application = getApplicationIfAccessible(applicationId);
List<ApplicationRelease> applicationReleases; List<ApplicationRelease> applicationReleases;
List<ApplicationRelease> filteredApplicationReleases = new ArrayList<>(); List<ApplicationRelease> filteredApplicationReleases = new ArrayList<>();
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
@ -362,8 +363,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
try { try {
ConnectionManagerUtil.openDBConnection(); ConnectionManagerUtil.openDBConnection();
applicationReleases = ApplicationManagementDAOFactory.getApplicationReleaseDAO() applicationReleases = this.applicationReleaseDAO.getReleases(application.getName(), application.getType(), tenantId);
.getReleases(application.getName(), application.getType(), tenantId);
for (ApplicationRelease applicationRelease : applicationReleases) { for (ApplicationRelease applicationRelease : applicationReleases) {
LifecycleState lifecycleState = ApplicationManagementDAOFactory.getLifecycleStateDAO(). LifecycleState lifecycleState = ApplicationManagementDAOFactory.getLifecycleStateDAO().
getLatestLifeCycleStateByReleaseID(applicationRelease.getId()); getLatestLifeCycleStateByReleaseID(applicationRelease.getId());
@ -393,7 +393,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
"need to have admin permission"); "need to have admin permission");
} }
if (validateApplication(applicationId) == null) { if (getApplicationIfAccessible(applicationId) == null) {
throw new ApplicationManagementException("Invalid Application"); throw new ApplicationManagementException("Invalid Application");
} }
List<ApplicationRelease> applicationReleases = getReleases(applicationId); List<ApplicationRelease> applicationReleases = getReleases(applicationId);
@ -406,7 +406,6 @@ public class ApplicationManagerImpl implements ApplicationManager {
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());
newAppLifecycleState.setUpdatedBy(userName);
addLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState); addLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState);
storedLocations.add(applicationRelease.getAppHashValue()); storedLocations.add(applicationRelease.getAppHashValue());
} }
@ -425,16 +424,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
@Override @Override
public String deleteApplicationRelease(int applicationId, String releaseUuid) public String deleteApplicationRelease(int applicationId, String releaseUuid)
throws ApplicationManagementException { throws ApplicationManagementException {
String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); Application application = getApplicationIfAccessible(applicationId);
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
Application application = validateApplication(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 = validateApplicationRelease(applicationId, releaseUuid); ApplicationRelease applicationRelease = getAppReleaseIfExists(applicationId, releaseUuid);
if (applicationRelease == null) {
throw new ApplicationManagementException("Invalid Application Release UUID is received");
}
LifecycleState appLifecycleState = getLifecycleState(applicationId, applicationRelease.getUuid()); LifecycleState appLifecycleState = getLifecycleState(applicationId, applicationRelease.getUuid());
String currentState = appLifecycleState.getCurrentState(); String currentState = appLifecycleState.getCurrentState();
if (AppLifecycleState.DEPRECATED.toString().equals(currentState) || AppLifecycleState if (AppLifecycleState.DEPRECATED.toString().equals(currentState) || AppLifecycleState
@ -443,7 +437,6 @@ public class ApplicationManagerImpl implements ApplicationManager {
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());
newAppLifecycleState.setUpdatedBy(userName);
addLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState); addLifecycleState(applicationId, applicationRelease.getUuid(), newAppLifecycleState);
}else{ }else{
throw new ApplicationManagementException("Can't delete the application release, You have to move the " + throw new ApplicationManagementException("Can't delete the application release, You have to move the " +
@ -487,15 +480,14 @@ public class ApplicationManagerImpl implements ApplicationManager {
throw new ValidationException("Username and tenant Id cannot be empty"); throw new ValidationException("Username and tenant Id cannot be empty");
} }
if (application.getAppCategory() == null) { if (application.getAppCategory() == null) {
throw new ValidationException("Username and tenant Id cannot be empty"); throw new ValidationException("Application category can't be empty");
} }
isValidApplicationType = isValidAppType(application); isValidApplicationType = isValidAppType(application);
if (!isValidApplicationType) { if (!isValidApplicationType) {
throw new ValidationException( throw new ValidationException(
"App Type contains in the application creating payload doesn't match with " + "App Type contains in the application creating payload doesn't match with supported app types");
"supported app types");
} }
validateApplicationExistence(application); validateApplicationExistence(application);
@ -537,12 +529,12 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
/** /**
* To validate the pre-request of the ApplicationRelease. * Get the application if application is an accessible one.
* *
* @param applicationId ID of the Application. * @param applicationId ID of the Application.
* @return Application related with the UUID * @return Application related with the UUID
*/ */
public Application validateApplication(int applicationId) throws ApplicationManagementException { public Application getApplicationIfAccessible(int applicationId) throws ApplicationManagementException {
if (applicationId <= 0) { if (applicationId <= 0) {
throw new ApplicationManagementException("Application id could,t be a negative integer. Hence please add " + throw new ApplicationManagementException("Application id could,t be a negative integer. Hence please add " +
"valid application id."); "valid application id.");
@ -568,7 +560,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
if (!isAppAllowed) { if (!isAppAllowed) {
throw new NotFoundException("Application of the " + applicationId + " does not exist."); throw new NotFoundException("Application of the " + applicationId
+ " does not exist. Please check whether user have permissions to access the application.");
} }
return application; return application;
} catch (UserStoreException e) { } catch (UserStoreException e) {
@ -580,12 +573,12 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
/** /**
* To validate the pre-request of the ApplicationRelease. * Get the application release for given UUID if application release is exists and application id is valid one.
* *
* @param applicationUuid UUID of the Application. * @param applicationUuid UUID of the Application.
* @return Application related with the UUID * @return Application related with the UUID
*/ */
public ApplicationRelease validateApplicationRelease(int applicationId, String applicationUuid) throws public ApplicationRelease getAppReleaseIfExists(int applicationId, String applicationUuid) throws
ApplicationManagementException { ApplicationManagementException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
ApplicationRelease applicationRelease; ApplicationRelease applicationRelease;
@ -600,8 +593,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
+ "parameter to get the relevant application."); + "parameter to get the relevant application.");
} }
ConnectionManagerUtil.openDBConnection(); ConnectionManagerUtil.openDBConnection();
applicationRelease = ApplicationManagementDAOFactory.getApplicationReleaseDAO().getReleaseByIds applicationRelease = this.applicationReleaseDAO.getReleaseByIds(applicationId, applicationUuid, tenantId);
(applicationId, applicationUuid, tenantId);
if (applicationRelease == null) { if (applicationRelease == null) {
throw new ApplicationManagementException("Doesn't exist a application release for application ID: " + throw new ApplicationManagementException("Doesn't exist a application release for application ID: " +
applicationId + "and application UUID: " + applicationId + "and application UUID: " +
@ -617,7 +609,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
@Override @Override
public ApplicationRelease updateRelease(int appId, ApplicationRelease applicationRelease) throws public ApplicationRelease updateRelease(int appId, ApplicationRelease applicationRelease) throws
ApplicationManagementException { ApplicationManagementException {
String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); validateAppReleasePayload(applicationRelease);
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Updating the Application release. UUID: " + applicationRelease.getUuid() + ", " + log.debug("Updating the Application release. UUID: " + applicationRelease.getUuid() + ", " +
@ -625,10 +617,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
try { try {
ConnectionManagerUtil.openDBConnection(); ConnectionManagerUtil.openDBConnection();
// todo consider about lifecycle applicationRelease = this.applicationReleaseDAO.updateRelease(appId, applicationRelease, tenantId);
applicationRelease = ApplicationManagementDAOFactory.getApplicationReleaseDAO()
.updateRelease(appId, applicationRelease, tenantId);
return applicationRelease; return applicationRelease;
} finally { } finally {
ConnectionManagerUtil.closeDBConnection(); ConnectionManagerUtil.closeDBConnection();
@ -636,7 +625,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
@Override @Override
public boolean isApplicationReleaseUpdateAcceptable(int appId, String appReleaseUuid) public boolean isAcceptableAppReleaseUpdate(int appId, String appReleaseUuid)
throws ApplicationManagementException { throws ApplicationManagementException {
LifecycleState lifecycleState = getLifecycleState(appId, appReleaseUuid); LifecycleState lifecycleState = getLifecycleState(appId, appReleaseUuid);
return AppLifecycleState.CREATED.toString().equals(lifecycleState.getCurrentState()) || AppLifecycleState return AppLifecycleState.CREATED.toString().equals(lifecycleState.getCurrentState()) || AppLifecycleState
@ -673,12 +662,12 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
/** /**
* To validate a create release request to make sure all the pre-conditions satisfied. * To validate a app release creating request and app updating request to make sure all the pre-conditions satisfied.
* *
* @param applicationRelease ApplicationRelease that need to be created. * @param applicationRelease ApplicationRelease that need to be created.
* @throws ApplicationManagementException Application Management Exception. * @throws ApplicationManagementException Application Management Exception.
*/ */
private void validateReleaseCreatingRequest(ApplicationRelease applicationRelease) private void validateAppReleasePayload(ApplicationRelease applicationRelease)
throws ApplicationManagementException { throws ApplicationManagementException {
if (applicationRelease.getVersion() == null) { if (applicationRelease.getVersion() == null) {
@ -693,9 +682,13 @@ public class ApplicationManagerImpl implements ApplicationManager {
LifecycleState lifecycleState; LifecycleState lifecycleState;
try { try {
ConnectionManagerUtil.openDBConnection(); ConnectionManagerUtil.openDBConnection();
LifecycleStateDAO lifecycleStateDAO = ApplicationManagementDAOFactory.getLifecycleStateDAO(); lifecycleState = this.lifecycleStateDAO.getLatestLifeCycleStateByReleaseID(applicationId);
ApplicationRelease applicationRelease = validateApplicationRelease(applicationId, applicationUuid); if (lifecycleState == null) {
lifecycleState = lifecycleStateDAO.getLatestLifeCycleStateByReleaseID(applicationRelease.getId()); throw new NotFoundException(
"Couldn't find the lifecycle data for appid: " + applicationId + " and app release UUID: "
+ applicationUuid);
}
lifecycleState.setNextStates(getNextLifecycleStates(lifecycleState.getCurrentState())); lifecycleState.setNextStates(getNextLifecycleStates(lifecycleState.getCurrentState()));
} catch (ApplicationManagementDAOException e) { } catch (ApplicationManagementDAOException e) {
throw new ApplicationManagementException("Failed to get lifecycle state", e); throw new ApplicationManagementException("Failed to get lifecycle state", e);
@ -708,19 +701,20 @@ public class ApplicationManagerImpl implements ApplicationManager {
} }
@Override @Override
public void addLifecycleState(int applicationId, String applicationUuid, LifecycleState state) throws public void addLifecycleState(int applicationId, String applicationUuid, LifecycleState state)
ApplicationManagementException { throws ApplicationManagementException {
try { try {
ConnectionManagerUtil.openDBConnection(); ConnectionManagerUtil.openDBConnection();
Application application = validateApplication(applicationId); Application application = getApplicationIfAccessible(applicationId);
ApplicationRelease applicationRelease = validateApplicationRelease(applicationId, applicationUuid); ApplicationRelease applicationRelease = getAppReleaseIfExists(applicationId, applicationUuid);
LifecycleStateDAO lifecycleStateDAO;
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
state.setUpdatedBy(userName);
if (state.getCurrentState() != null && state.getPreviousState() != null && state.getUpdatedBy() != null) { if (state.getCurrentState() != null && state.getPreviousState() != null) {
validateLifecycleState(state); validateLifecycleState(state);
lifecycleStateDAO = ApplicationManagementDAOFactory.getLifecycleStateDAO(); this.lifecycleStateDAO
lifecycleStateDAO.addLifecycleState(state, application.getId(), applicationRelease.getId(), tenantId); .addLifecycleState(state, application.getId(), applicationRelease.getId(), tenantId);
} }
} catch (LifeCycleManagementDAOException | DBConnectionException e) { } catch (LifeCycleManagementDAOException | DBConnectionException e) {
throw new ApplicationManagementException("Failed to add lifecycle state", e); throw new ApplicationManagementException("Failed to add lifecycle state", e);
@ -828,7 +822,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
public Application updateApplication(Application application) throws ApplicationManagementException { public Application updateApplication(Application application) throws ApplicationManagementException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
Application existingApplication = validateApplication(application.getId()); Application existingApplication = getApplicationIfAccessible(application.getId());
List<UnrestrictedRole> addingRoleList; List<UnrestrictedRole> addingRoleList;
List<UnrestrictedRole> removingRoleList; List<UnrestrictedRole> removingRoleList;
List<Tag> addingTags; List<Tag> addingTags;

@ -23,12 +23,12 @@ import com.dd.plist.NSDictionary;
import com.dd.plist.NSString; import com.dd.plist.NSString;
import com.dd.plist.PropertyListFormatException; import com.dd.plist.PropertyListFormatException;
import com.dd.plist.PropertyListParser; import com.dd.plist.PropertyListParser;
import net.dongliu.apk.parser.ApkFile;
import net.dongliu.apk.parser.bean.ApkMeta; import net.dongliu.apk.parser.bean.ApkMeta;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.commons.validator.routines.UrlValidator;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.application.mgt.common.ApplicationRelease; import org.wso2.carbon.device.application.mgt.common.ApplicationRelease;
import org.wso2.carbon.device.application.mgt.common.ApplicationType; import org.wso2.carbon.device.application.mgt.common.ApplicationType;
@ -41,16 +41,10 @@ import org.wso2.carbon.device.application.mgt.core.util.ArtifactsParser;
import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil; import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
import org.wso2.carbon.device.application.mgt.core.util.Constants; import org.wso2.carbon.device.application.mgt.core.util.Constants;
import org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil; import org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil;
import org.apache.commons.validator.routines.UrlValidator;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import java.io.BufferedOutputStream; import javax.xml.parsers.ParserConfigurationException;
import java.io.File; import java.io.*;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.text.ParseException; import java.text.ParseException;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -59,8 +53,6 @@ import java.util.Objects;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
import javax.xml.parsers.ParserConfigurationException;
import static org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil.deleteDir; import static org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil.deleteDir;
import static org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil.saveFile; import static org.wso2.carbon.device.application.mgt.core.util.StorageManagementUtil.saveFile;

@ -208,7 +208,7 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
attachments.add(screenshot.getDataHandler().getInputStream()); attachments.add(screenshot.getDataHandler().getInputStream());
} }
} }
applicationRelease = applicationManager.validateApplicationRelease(appId, applicationUuid); applicationRelease = applicationManager.getAppReleaseIfExists(appId, applicationUuid);
LifecycleState lifecycleState = applicationManager.getLifecycleState(appId, applicationRelease.getUuid()); LifecycleState lifecycleState = applicationManager.getLifecycleState(appId, applicationRelease.getUuid());
if (AppLifecycleState.PUBLISHED.toString().equals(lifecycleState.getCurrentState()) || if (AppLifecycleState.PUBLISHED.toString().equals(lifecycleState.getCurrentState()) ||
AppLifecycleState.DEPRECATED.toString().equals(lifecycleState.getCurrentState())) { AppLifecycleState.DEPRECATED.toString().equals(lifecycleState.getCurrentState())) {
@ -222,7 +222,9 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
return Response.status(Response.Status.OK) return Response.status(Response.Status.OK)
.entity("Successfully uploaded artifacts for the application " + applicationUuid).build(); .entity("Successfully uploaded artifacts for the application " + applicationUuid).build();
} catch (NotFoundException e) { } catch (NotFoundException e) {
String msg = "Couldn't found application release details and storage details"; String msg =
"Couldn't found application release details or storage details or lifecycle details. Application id: "
+ appId + " App release uuid: " + applicationUuid;
log.error(msg, e); log.error(msg, e);
return APIUtil.getResponse(e, Response.Status.NOT_FOUND); return APIUtil.getResponse(e, Response.Status.NOT_FOUND);
} catch (ApplicationManagementException e) { } catch (ApplicationManagementException e) {
@ -260,7 +262,7 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
return APIUtil.getResponse("Uploading artifacts for the application is failed " + applicationUuid, return APIUtil.getResponse("Uploading artifacts for the application is failed " + applicationUuid,
Response.Status.BAD_REQUEST); Response.Status.BAD_REQUEST);
} }
applicationRelease = applicationManager.validateApplicationRelease(applicationId, applicationUuid); applicationRelease = applicationManager.getAppReleaseIfExists(applicationId, applicationUuid);
applicationRelease = applicationStorageManager applicationRelease = applicationStorageManager
.updateReleaseArtifacts(applicationRelease, appType, deviceType, .updateReleaseArtifacts(applicationRelease, appType, deviceType,
binaryFile.getDataHandler().getInputStream()); binaryFile.getDataHandler().getInputStream());
@ -323,9 +325,9 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
List<InputStream> attachments = new ArrayList<>(); List<InputStream> attachments = new ArrayList<>();
try { try {
Application application = applicationManager.validateApplication(applicationId); Application application = applicationManager.getApplicationIfAccessible(applicationId);
if (!applicationManager.isApplicationReleaseUpdateAcceptable(application.getId(), if (!applicationManager.isAcceptableAppReleaseUpdate(application.getId(),
applicationRelease.getUuid())) { applicationRelease.getUuid())) {
String msg = "Application release is in the " + applicationRelease.getLifecycleState().getCurrentState() String msg = "Application release is in the " + applicationRelease.getLifecycleState().getCurrentState()
+ " state. Hence updating is not acceptable when application in this state"; + " state. Hence updating is not acceptable when application in this state";
@ -424,7 +426,13 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
ApplicationManager applicationManager = APIUtil.getApplicationManager(); ApplicationManager applicationManager = APIUtil.getApplicationManager();
try { try {
lifecycleState = applicationManager.getLifecycleState(applicationId, applicationUuid); lifecycleState = applicationManager.getLifecycleState(applicationId, applicationUuid);
} catch (ApplicationManagementException e) { } catch (NotFoundException e){
String msg = "Couldn't found application lifecycle details for appid: " + applicationId
+ " and app release UUID: " + applicationUuid;
log.error(msg, e);
return Response.status(Response.Status.NOT_FOUND).build();
}
catch (ApplicationManagementException e) {
String msg = "Error occurred while getting lifecycle state."; String msg = "Error occurred while getting lifecycle state.";
log.error(msg, e); log.error(msg, e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Application Management API Feature</name> <name>WSO2 Carbon - Application Management API Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -1,8 +1,4 @@
instructions.configure = \ instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.api_${feature.version}/webapps/api#application-mgt-publisher#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt-publisher#v1.0.war,overwrite:true);\
.mgt.api_${feature.version}/webapps/api#application-mgt-publisher#v1.0.war,target:${installFolder}/../. org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.api_${feature.version}/webapps/api#application-mgt-store#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#application-mgt-store#v1.0.war,overwrite:true);\
./deployment/server/webapps/api#application-mgt-publisher#v1.0.war,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application
.mgt.api_${feature.version}/webapps/api#application-mgt-store#v1.0.war,target:${installFolder}/../.
./deployment/server/webapps/api#application-mgt-store#v1.0.war,overwrite:true);\

@ -22,12 +22,12 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.auth.handler.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.auth.handler.feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Application Management Authentication Handler Feature</name> <name>WSO2 Carbon - Application Management Authentication Handler Feature</name>
<description>This feature contains the Authentication Handler implementation for Publisher and Store.</description> <description>This feature contains the Authentication Handler implementation for Publisher and Store.</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.0.46-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.extensions.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.extensions.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.46-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<name>WSO2 Carbon - Application Management Extension Feature</name> <name>WSO2 Carbon - Application Management Extension Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Application Management Extension Feature</description> <description>WSO2 Application Management Extension Feature</description>

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Application Management Aggregate Feature</name> <name>WSO2 Carbon - Application Management Aggregate Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
@ -45,14 +45,14 @@
<artifactId>org.wso2.carbon.device.application.mgt.publisher.ui.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.publisher.ui.feature</artifactId>
<type>zip</type> <type>zip</type>
</dependency> </dependency>
<dependency> <!--<dependency>-->
<groupId>javax.servlet.jsp</groupId> <!--<groupId>javax.servlet.jsp</groupId>-->
<artifactId>javax.servlet.jsp-api</artifactId> <!--<artifactId>javax.servlet.jsp-api</artifactId>-->
</dependency> <!--</dependency>-->
<dependency> <!--<dependency>-->
<groupId>org.wso2.orbit.org.scannotation</groupId> <!--<groupId>org.wso2.orbit.org.scannotation</groupId>-->
<artifactId>scannotation</artifactId> <!--<artifactId>scannotation</artifactId>-->
</dependency> <!--</dependency>-->
</dependencies> </dependencies>
<build> <build>
@ -79,10 +79,10 @@
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.server.feature:${carbon.device.mgt.version}</includedFeatureDef> <includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.server.feature:${carbon.device.mgt.version}</includedFeatureDef>
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.publisher.ui.feature:${carbon.device.mgt.version}</includedFeatureDef> <includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.publisher.ui.feature:${carbon.device.mgt.version}</includedFeatureDef>
</includedFeatures> </includedFeatures>
<bundles> <!--<bundles>-->
<bundleDef>javax.servlet.jsp:javax.servlet.jsp-api</bundleDef> <!--<bundleDef>javax.servlet.jsp:javax.servlet.jsp-api</bundleDef>-->
<bundleDef>org.wso2.orbit.org.scannotation:scannotation:${scannotation.version}</bundleDef> <!--<bundleDef>org.wso2.orbit.org.scannotation:scannotation:${scannotation.version}</bundleDef>-->
</bundles> <!--</bundles>-->
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.publisher.ui.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.publisher.ui.feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Application Management Publisher UI Feature</name> <name>WSO2 Carbon - Application Management Publisher UI Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.server.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<name>WSO2 Carbon - Application Management Server Feature</name> <name>WSO2 Carbon - Application Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Application Management functionality <description>This feature contains the core bundles required for Back-end Application Management functionality
@ -44,16 +44,24 @@
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.core</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.core</artifactId>
</dependency> </dependency>
<dependency> <!--<dependency>-->
<groupId>org.wso2.carbon.devicemgt</groupId> <!--<groupId>javax.servlet.jsp</groupId>-->
<artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId> <!--<artifactId>javax.servlet.jsp-api</artifactId>-->
<type>zip</type> <!--</dependency>-->
</dependency> <!--<dependency>-->
<dependency> <!--<groupId>org.wso2.orbit.org.scannotation</groupId>-->
<groupId>org.wso2.carbon.devicemgt</groupId> <!--<artifactId>scannotation</artifactId>-->
<artifactId>org.wso2.carbon.device.application.mgt.auth.handler.feature</artifactId> <!--</dependency>-->
<type>zip</type> <!--<dependency>-->
</dependency> <!--<groupId>org.wso2.carbon.devicemgt</groupId>-->
<!--<artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId>-->
<!--<type>zip</type>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.wso2.carbon.devicemgt</groupId>-->
<!--<artifactId>org.wso2.carbon.device.application.mgt.auth.handler.feature</artifactId>-->
<!--<type>zip</type>-->
<!--</dependency>-->
</dependencies> </dependencies>
<build> <build>
@ -103,10 +111,10 @@
<propertyDef>org.eclipse.equinox.p2.type.group:false</propertyDef> <propertyDef>org.eclipse.equinox.p2.type.group:false</propertyDef>
</properties> </properties>
</adviceFile> </adviceFile>
<includedFeatures> <!--<includedFeatures>-->
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version}</includedFeatureDef> <!--<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version}</includedFeatureDef>-->
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.auth.handler.feature:${carbon.device.mgt.version}</includedFeatureDef> <!--<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.auth.handler.feature:${carbon.device.mgt.version}</includedFeatureDef>-->
</includedFeatures> <!--</includedFeatures>-->
<bundles> <bundles>
<bundleDef> <bundleDef>
org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.common:${carbon.device.mgt.version} org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.common:${carbon.device.mgt.version}
@ -114,12 +122,14 @@
<bundleDef> <bundleDef>
org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.core:${carbon.device.mgt.version} org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.core:${carbon.device.mgt.version}
</bundleDef> </bundleDef>
<!--<bundleDef>javax.servlet.jsp:javax.servlet.jsp-api</bundleDef>-->
<!--<bundleDef>org.wso2.orbit.org.scannotation:scannotation:${scannotation.version}</bundleDef>-->
</bundles> </bundles>
<importBundles> <importBundles>
</importBundles> </importBundles>
<importFeatures> <!--<importFeatures>-->
<importFeatureDef>org.wso2.carbon.core.server:${carbon.kernel.version}</importFeatureDef> <!--<importFeatureDef>org.wso2.carbon.core.server:${carbon.kernel.version}</importFeatureDef>-->
</importFeatures> <!--</importFeatures>-->
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

@ -23,12 +23,12 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.store.ui.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.store.ui.feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Application Management Store UI Feature</name> <name>WSO2 Carbon - Application Management Store UI Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>application-mgt-feature</artifactId> <artifactId>application-mgt-feature</artifactId>
<version>3.1.34-SNAPSHOT</version> <version>3.1.40-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Application Management Feature</name> <name>WSO2 Carbon - Application Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -1740,7 +1740,6 @@
<artifactId>apk-parser</artifactId> <artifactId>apk-parser</artifactId>
<version>${net.dongliu.version}</version> <version>${net.dongliu.version}</version>
</dependency> </dependency>
<!--websocket dependency--> <!--websocket dependency-->
<dependency> <dependency>
<groupId>javax.websocket</groupId> <groupId>javax.websocket</groupId>
@ -2196,7 +2195,7 @@
<!-- app management related versions --> <!-- app management related versions -->
<googlecode.plist.version>1.8</googlecode.plist.version> <googlecode.plist.version>1.8</googlecode.plist.version>
<net.dongliu.version>2.4.2</net.dongliu.version> <net.dongliu.version>2.4.2</net.dongliu.version>
<!--websocket related lib versions--> <!--websocket related lib versions-->
<tomcat.websocket.version>7.0.85</tomcat.websocket.version> <tomcat.websocket.version>7.0.85</tomcat.websocket.version>
<javax.websocket.version>1.0</javax.websocket.version> <javax.websocket.version>1.0</javax.websocket.version>

Loading…
Cancel
Save