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
feature/appm-store/pbac
lasantha 7 years ago
parent c3d0b375a5
commit 5ee9983305

@ -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);
}
}

Loading…
Cancel
Save