From 3c76c78d764ceb639c450b490dff657c379d3437 Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 3 Oct 2017 10:46:25 +0530 Subject: [PATCH 1/4] Making the icon to be returned with the Application --- .../api/services/impl/ApplicationManagementAPIImpl.java | 3 +++ .../carbon/device/application/mgt/common/Application.java | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java index c73e2a8487c..74d8b4fb87d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java @@ -97,12 +97,15 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { @Path("/{uuid}") public Response getApplication(@PathParam("uuid") String uuid) { ApplicationManager applicationManager = APIUtil.getApplicationManager(); + ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager(); try { Application application = applicationManager.getApplication(uuid); if (application == null) { return Response.status(Response.Status.NOT_FOUND) .entity("Application with UUID " + uuid + " not found").build(); } + ImageArtifact icon = applicationStorageManager.getImageArtifact(uuid, "icon", 0); + application.setIcon(icon); return Response.status(Response.Status.OK).entity(application).build(); } catch (NotFoundException e) { return Response.status(Response.Status.NOT_FOUND).build(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java index 246089b2a72..0f76dd36e5d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java @@ -21,6 +21,7 @@ package org.wso2.carbon.device.application.mgt.common; import org.wso2.carbon.device.application.mgt.common.jaxrs.Exclude; +import java.awt.*; import java.util.Date; import java.util.List; import java.util.Map; @@ -69,6 +70,8 @@ public class Application { private User user; + private ImageArtifact icon; + public int getId() { return id; } @@ -221,6 +224,10 @@ public class Application { return screenShotCount; } + public void setIcon(ImageArtifact icon) { + this.icon = icon; + } + @Override public String toString() { String app = "UUID : " + uuid + "\tName : " + name + "\tShort Description : " From ce986cb118827a8e2461e82df4868d4dc932b876 Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 3 Oct 2017 13:54:14 +0530 Subject: [PATCH 2/4] Adding the ApplicationManagement API to return the images with the getApplication request --- .../services/ApplicationManagementAPI.java | 7 +++- .../impl/ApplicationManagementAPIImpl.java | 24 +++++++++-- .../application/mgt/common/Application.java | 13 ++++++ .../mgt/core/config/Configuration.java | 9 ---- .../mgt/core/config/Extension.java | 1 - .../impl/ApplicationStorageManagerImpl.java | 42 ++++++++++++++++--- .../mgt/core/internal/ServiceComponent.java | 2 - .../application/mgt/core/util/Constants.java | 4 -- .../main/resources/conf/application-mgt.xml | 14 ++----- 9 files changed, 80 insertions(+), 36 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ApplicationManagementAPI.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ApplicationManagementAPI.java index 722c79974a6..c849837f786 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ApplicationManagementAPI.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/ApplicationManagementAPI.java @@ -195,7 +195,12 @@ public interface ApplicationManagementAPI { name = "uuid", value = "UUID of the application", required = true) - @PathParam("uuid") String uuid + @PathParam("uuid") String uuid, + @ApiParam( + name = "isWithImages", + value = "Whether to return application with images", + required = false) + @QueryParam("isWithImages") Boolean IsWithImages ); @PUT diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java index 74d8b4fb87d..b4032bcc965 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java @@ -72,6 +72,8 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { public Response getApplications(@QueryParam("offset") int offset, @QueryParam("limit") int limit, @QueryParam("query") String searchQuery) { ApplicationManager applicationManager = APIUtil.getApplicationManager(); + ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager(); + try { if (limit == 0) { limit = DEFAULT_LIMIT; @@ -82,6 +84,12 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { filter.setSearchQuery(searchQuery); ApplicationList applications = applicationManager.getApplications(filter); + + for (Application application : applications.getApplications()) { + ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(application.getUuid(), + "icon", 0); + application.setIcon(imageArtifact); + } return Response.status(Response.Status.OK).entity(applications).build(); } catch (NotFoundException e) { return Response.status(Response.Status.NOT_FOUND).build(); @@ -95,7 +103,7 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { @GET @Consumes("application/json") @Path("/{uuid}") - public Response getApplication(@PathParam("uuid") String uuid) { + public Response getApplication(@PathParam("uuid") String uuid, @QueryParam("isWithImages") Boolean isWithImages) { ApplicationManager applicationManager = APIUtil.getApplicationManager(); ApplicationStorageManager applicationStorageManager = APIUtil.getApplicationStorageManager(); try { @@ -104,8 +112,18 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { return Response.status(Response.Status.NOT_FOUND) .entity("Application with UUID " + uuid + " not found").build(); } - ImageArtifact icon = applicationStorageManager.getImageArtifact(uuid, "icon", 0); - application.setIcon(icon); + + if (isWithImages != null && isWithImages) { + ImageArtifact icon = applicationStorageManager.getImageArtifact(uuid, "icon", 0); + ImageArtifact banner = applicationStorageManager.getImageArtifact(uuid, "banner", 0); + int screenShotCount = application.getScreenShotCount(); + for (int count = 1; count < screenShotCount; count++) { + ImageArtifact screenShot = applicationStorageManager.getImageArtifact(uuid, "screenshot", count); + application.addScreenShot(screenShot); + } + application.setIcon(icon); + application.setBanner(banner); + } return Response.status(Response.Status.OK).entity(application).build(); } catch (NotFoundException e) { return Response.status(Response.Status.NOT_FOUND).build(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java index 0f76dd36e5d..a6468de326e 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java @@ -22,6 +22,7 @@ package org.wso2.carbon.device.application.mgt.common; import org.wso2.carbon.device.application.mgt.common.jaxrs.Exclude; import java.awt.*; +import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; @@ -72,6 +73,10 @@ public class Application { private ImageArtifact icon; + private ImageArtifact banner; + + private List screenShots = new ArrayList<>(); + public int getId() { return id; } @@ -228,6 +233,14 @@ public class Application { this.icon = icon; } + public void setBanner(ImageArtifact banner) { + this.banner = banner; + } + + public void addScreenShot(ImageArtifact screenShot) { + this.screenShots.add(screenShot); + } + @Override public String toString() { String app = "UUID : " + uuid + "\tName : " + name + "\tShort Description : " diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java index 2d076c1d37b..4b085f84274 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Configuration.java @@ -53,15 +53,6 @@ public class Configuration { public void setExtensions(List extensions) { this.extensions = extensions; } - - @XmlElement(name = "Artifacts") - public Artifacts getArtifacts() { - return artifacts; - } - - public void setArtifacts(Artifacts artifacts) { - this.artifacts = artifacts; - } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Extension.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Extension.java index 5ad1d05440f..9ce5c282f70 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Extension.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/config/Extension.java @@ -80,7 +80,6 @@ public class Extension { public enum Name { ApplicationManager, ApplicationReleaseManager, - ApplicationUploadManager, CategoryManager, CommentsManager, LifecycleStateManager, diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationStorageManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationStorageManagerImpl.java index 97d0af23528..cbf3e935ce1 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationStorageManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationStorageManagerImpl.java @@ -54,13 +54,26 @@ import java.util.List; */ public class ApplicationStorageManagerImpl implements ApplicationStorageManager { private static final Log log = LogFactory.getLog(ApplicationStorageManagerImpl.class); + private String storagePath; + private int screenShotMaxCount; + + /** + * Create a new ApplicationStorageManager Instance + * + * @param storagePath Storage Path to save the binary and image files. + * @param screenShotMaxCount Maximum Screen-shots count + */ + public ApplicationStorageManagerImpl(String storagePath, String screenShotMaxCount) { + this.storagePath = storagePath; + this.screenShotMaxCount = Integer.parseInt(screenShotMaxCount); + } @Override public void uploadImageArtifacts(String applicationUUID, InputStream iconFileStream, InputStream bannerFileStream, List screenShotStreams) throws ApplicationStorageManagementException { int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); Application application = validateApplication(applicationUUID); - String artifactDirectoryPath = Constants.artifactPath + application.getId(); + String artifactDirectoryPath = storagePath + application.getId(); if (log.isDebugEnabled()) { log.debug("Artifact Directory Path for saving the artifacts related with application " + applicationUUID + " is " + artifactDirectoryPath); @@ -86,12 +99,29 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager } if (screenShotStreams != null) { int count = application.getScreenShotCount() + 1; + boolean maxCountReached = false; + + if (count > screenShotMaxCount) { + log.error("Maximum limit for the screen-shot is " + screenShotMaxCount + + " Cannot upload another screenshot for the application with the UUID " + applicationUUID); + maxCountReached = true; + } String screenshotName; + + if (maxCountReached) { + return; + } for (InputStream screenshotStream : screenShotStreams) { try { screenshotName = Constants.IMAGE_ARTIFACTS[2] + count; saveFile(screenshotStream, artifactDirectoryPath + File.separator + screenshotName); count++; + if (count > screenShotMaxCount) { + log.error("Maximum limit for the screen-shot is " + screenShotMaxCount + + " Cannot upload another screenshot for the application with the UUID " + + applicationUUID); + break; + } } catch (IOException e) { throw new ApplicationStorageManagementException( "IO Exception while saving the screens hots for the " + "application " + applicationUUID, @@ -127,7 +157,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager public void uploadReleaseArtifacts(String applicationUUID, String versionName, InputStream binaryFile) throws ApplicationStorageManagementException { Application application = validateApplication(applicationUUID); - String artifactDirectoryPath = Constants.artifactPath + application.getId(); + String artifactDirectoryPath = storagePath + application.getId(); if (log.isDebugEnabled()) { log.debug("Artifact Directory Path for saving the application release related artifacts related with " + "application " + applicationUUID + " is " + artifactDirectoryPath); @@ -150,7 +180,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager public InputStream getReleasedArtifacts(String applicationUUID, String versionName) throws ApplicationStorageManagementException { Application application = validateApplication(applicationUUID); - String artifactPath = Constants.artifactPath + application.getId() + File.separator + versionName; + String artifactPath = storagePath + application.getId() + File.separator + versionName; if (log.isDebugEnabled()) { log.debug("ApplicationRelease artifacts are searched in the location " + artifactPath); @@ -173,7 +203,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager @Override public void deleteApplicationArtifacts(String applicationUUID) throws ApplicationStorageManagementException { Application application = validateApplication(applicationUUID); - String artifactDirectoryPath = Constants.artifactPath + application.getId(); + String artifactDirectoryPath = storagePath + application.getId(); File artifactDirectory = new File(artifactDirectoryPath); if (artifactDirectory.exists()) { @@ -185,7 +215,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager public void deleteApplicationReleaseArtifacts(String applicationUUID, String version) throws ApplicationStorageManagementException { Application application = validateApplication(applicationUUID); - String artifactPath = Constants.artifactPath + application.getId() + File.separator + version; + String artifactPath = storagePath + application.getId() + File.separator + version; File artifact = new File(artifactPath); if (artifact.exists()) { @@ -215,7 +245,7 @@ public class ApplicationStorageManagerImpl implements ApplicationStorageManager ApplicationStorageManagementException { Application application = validateApplication(applicationUUID); validateImageArtifactNames(name); - String imageArtifactPath = Constants.artifactPath + application.getId() + File.separator + name.toLowerCase(); + String imageArtifactPath = storagePath + application.getId() + File.separator + name.toLowerCase(); if (name.equalsIgnoreCase(Constants.IMAGE_ARTIFACTS[2])) { imageArtifactPath += count; diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ServiceComponent.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ServiceComponent.java index 3ea5dcf23f0..bc0919d8e68 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ServiceComponent.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/internal/ServiceComponent.java @@ -77,8 +77,6 @@ public class ServiceComponent { String datasourceName = ConfigurationManager.getInstance().getConfiguration().getDatasourceName(); DAOFactory.init(datasourceName); - Constants.artifactPath = ConfigurationManager.getInstance().getConfiguration().getArtifacts() - .getBinaryLocation(); ApplicationManager applicationManager = ApplicationManagementUtil.getApplicationManagerInstance(); DataHolder.getInstance().setApplicationManager(applicationManager); bundleContext.registerService(ApplicationManager.class.getName(), applicationManager, null); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/Constants.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/Constants.java index 9c6992b204a..76d01d6e830 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/Constants.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/Constants.java @@ -54,10 +54,6 @@ public class Constants { public static final String[] LIFE_CYCLES = {"CREATED", "IN REVIEW", "APPROVED", "REJECTED", "PUBLISHED", "UNPUBLISHED", "RETIRED"}; - /** - * Path to save the Application related artifacts. - */ - public static String artifactPath = ""; /** * Name of the image artifacts that are saved in the file system. diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml index cd8091d2616..9807db661eb 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml @@ -22,12 +22,6 @@ jdbc/APPM_DS - - org.wso2.carbon.device.application.mgt.core.impl.ApplicationUploadManagerImpl - - repository/resources/mobileapps - - org.wso2.carbon.device.application.mgt.core.impl.ApplicationManagerImpl @@ -57,10 +51,10 @@ org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl + + repository/resources/mobileapps + 6 + - - - repository/resources/mobileapps/ - \ No newline at end of file From 3e6c3d7f3c72eb91768df9601bf4da55cce262dc Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 3 Oct 2017 14:28:47 +0530 Subject: [PATCH 3/4] Refactoring --- .../services/impl/ApplicationManagementAPIImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java index b4032bcc965..e68b9dd6979 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.api/src/main/java/org/wso2/carbon/device/application/mgt/api/services/impl/ApplicationManagementAPIImpl.java @@ -87,7 +87,7 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { for (Application application : applications.getApplications()) { ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(application.getUuid(), - "icon", 0); + Constants.IMAGE_ARTIFACTS[0], 0); application.setIcon(imageArtifact); } return Response.status(Response.Status.OK).entity(applications).build(); @@ -114,11 +114,13 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { } if (isWithImages != null && isWithImages) { - ImageArtifact icon = applicationStorageManager.getImageArtifact(uuid, "icon", 0); - ImageArtifact banner = applicationStorageManager.getImageArtifact(uuid, "banner", 0); + ImageArtifact icon = applicationStorageManager.getImageArtifact(uuid, Constants.IMAGE_ARTIFACTS[0], 0); + ImageArtifact banner = applicationStorageManager.getImageArtifact(uuid, Constants.IMAGE_ARTIFACTS[1], + 0); int screenShotCount = application.getScreenShotCount(); for (int count = 1; count < screenShotCount; count++) { - ImageArtifact screenShot = applicationStorageManager.getImageArtifact(uuid, "screenshot", count); + ImageArtifact screenShot = applicationStorageManager.getImageArtifact(uuid, Constants + .IMAGE_ARTIFACTS[2], count); application.addScreenShot(screenShot); } application.setIcon(icon); From 068edaa1578e331c470306cbd8e02ca8290ef783 Mon Sep 17 00:00:00 2001 From: megala21 Date: Tue, 3 Oct 2017 14:35:11 +0530 Subject: [PATCH 4/4] Changing the Storage path --- .../src/main/resources/conf/application-mgt.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml index 9807db661eb..dd88d20bf59 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf/application-mgt.xml @@ -52,7 +52,7 @@ org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl - repository/resources/mobileapps + repository/resources/apps 6