From 5ee9983305ee5fb6a62fb2686ee730784ad217ff Mon Sep 17 00:00:00 2001 From: lasantha Date: Fri, 16 Feb 2018 02:31:41 +0530 Subject: [PATCH] modified application management store API This is WIP API and in order to avoid build failure commented few lines and those need to be fixed when the development continues --- .../impl/ApplicationManagementAPIImpl.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java index d4a2f2e3e4..c05ac076c1 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ApplicationManagementAPIImpl.java @@ -84,8 +84,8 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { String uuId = applicationManager.getUuidOfLatestRelease(application.getId()); if (uuId != null){ application.setUuidOfLatestRelease(uuId); - ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0); - application.setIconOfLatestRelease(imageArtifact); +// ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0); +// application.setIconOfLatestRelease(imageArtifact); }else{ // ToDo set default icon } @@ -97,9 +97,6 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { String msg = "Error occurred while getting the application list"; log.error(msg, e); return Response.status(Response.Status.BAD_REQUEST).build(); - } catch (ApplicationStorageManagementException e) { - log.error("Error occurred while getting the image artifacts of the application", e); - return APIUtil.getResponse(e, Response.Status.INTERNAL_SERVER_ERROR); } } @@ -120,8 +117,8 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { String uuId = applicationManager.getUuidOfLatestRelease(application.getId()); if (uuId != null){ application.setUuidOfLatestRelease(uuId); - ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0); - application.setIconOfLatestRelease(imageArtifact); +// ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0); +// application.setIconOfLatestRelease(imageArtifact); }else{ // ToDo set default icon } @@ -132,9 +129,6 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { } catch (ApplicationManagementException e) { log.error("Error occurred while getting application with the uuid " + appType, e); return APIUtil.getResponse(e, Response.Status.INTERNAL_SERVER_ERROR); - } catch (ApplicationStorageManagementException e) { - log.error("Error occurred while getting the image artifacts of the application with the uuid " + appType, e); - return APIUtil.getResponse(e, Response.Status.INTERNAL_SERVER_ERROR); } }