mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Format the application management API source
This commit is contained in:
parent
8b505a7741
commit
f83b466955
@ -327,9 +327,18 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI {
|
|||||||
try {
|
try {
|
||||||
Application application = applicationManager.validateApplication(applicationId);
|
Application application = applicationManager.validateApplication(applicationId);
|
||||||
|
|
||||||
|
if (!applicationManager.isApplicationReleaseUpdateAcceptable(application.getId(),
|
||||||
|
applicationRelease.getUuid())) {
|
||||||
|
String msg = "Application release is in the " + applicationRelease.getCurrentState() + " state. Hence" +
|
||||||
|
" updating is not acceptable when application in this state";
|
||||||
|
log.error(msg);
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST).entity(msg).build();
|
||||||
|
}
|
||||||
if (binaryFile != null) {
|
if (binaryFile != null) {
|
||||||
applicationRelease = applicationStorageManager.updateReleaseArtifacts(applicationRelease,
|
applicationRelease = applicationStorageManager.updateReleaseArtifacts(applicationRelease,
|
||||||
application.getType(), binaryFile.getDataHandler().getInputStream());
|
application.getType(),
|
||||||
|
binaryFile.getDataHandler()
|
||||||
|
.getInputStream());
|
||||||
}
|
}
|
||||||
if (iconFile != null) {
|
if (iconFile != null) {
|
||||||
iconFileStream = iconFile.getDataHandler().getInputStream();
|
iconFileStream = iconFile.getDataHandler().getInputStream();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user