|
|
@ -84,8 +84,8 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
|
|
|
|
String uuId = applicationManager.getUuidOfLatestRelease(application.getId());
|
|
|
|
String uuId = applicationManager.getUuidOfLatestRelease(application.getId());
|
|
|
|
if (uuId != null){
|
|
|
|
if (uuId != null){
|
|
|
|
application.setUuidOfLatestRelease(uuId);
|
|
|
|
application.setUuidOfLatestRelease(uuId);
|
|
|
|
ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0);
|
|
|
|
// ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0);
|
|
|
|
application.setIconOfLatestRelease(imageArtifact);
|
|
|
|
// application.setIconOfLatestRelease(imageArtifact);
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
// ToDo set default icon
|
|
|
|
// ToDo set default icon
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -97,9 +97,6 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
|
|
|
|
String msg = "Error occurred while getting the application list";
|
|
|
|
String msg = "Error occurred while getting the application list";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|
return Response.status(Response.Status.BAD_REQUEST).build();
|
|
|
|
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());
|
|
|
|
String uuId = applicationManager.getUuidOfLatestRelease(application.getId());
|
|
|
|
if (uuId != null){
|
|
|
|
if (uuId != null){
|
|
|
|
application.setUuidOfLatestRelease(uuId);
|
|
|
|
application.setUuidOfLatestRelease(uuId);
|
|
|
|
ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0);
|
|
|
|
// ImageArtifact imageArtifact = applicationStorageManager.getImageArtifact(uuId, Constants.IMAGE_ARTIFACTS[0], 0);
|
|
|
|
application.setIconOfLatestRelease(imageArtifact);
|
|
|
|
// application.setIconOfLatestRelease(imageArtifact);
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
// ToDo set default icon
|
|
|
|
// ToDo set default icon
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -132,9 +129,6 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
|
|
|
|
} catch (ApplicationManagementException e) {
|
|
|
|
} catch (ApplicationManagementException e) {
|
|
|
|
log.error("Error occurred while getting application with the uuid " + appType, e);
|
|
|
|
log.error("Error occurred while getting application with the uuid " + appType, e);
|
|
|
|
return APIUtil.getResponse(e, Response.Status.INTERNAL_SERVER_ERROR);
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|