|
|
|
@ -531,18 +531,6 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|
|
|
|
throw new BadRequestException(
|
|
|
|
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
|
|
|
|
}
|
|
|
|
|
String scheduledTime = applicationInstallationBeanWrapper.getOperation().getSchedule();
|
|
|
|
|
if (scheduledTime != null && !scheduledTime.isEmpty()) {
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
|
|
|
|
|
try {
|
|
|
|
|
String formattedScheduledDate = format.format(format.parse(scheduledTime));
|
|
|
|
|
applicationInstallationBeanWrapper.getOperation().setSchedule(formattedScheduledDate);
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
String errorMessage = "Invalid date string is provided in for schedule parameter";
|
|
|
|
|
throw new BadRequestException(
|
|
|
|
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ApplicationInstallation applicationInstallation = applicationInstallationBeanWrapper.getOperation();
|
|
|
|
|
validateApplicationUrl(applicationInstallation.getUrl());
|
|
|
|
@ -593,18 +581,6 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|
|
|
|
throw new BadRequestException(
|
|
|
|
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
|
|
|
|
}
|
|
|
|
|
String scheduledTime = applicationUpdateBeanWrapper.getOperation().getSchedule();
|
|
|
|
|
if (scheduledTime != null && !scheduledTime.isEmpty()) {
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
|
|
|
|
|
try {
|
|
|
|
|
String formattedScheduledDate = format.format(format.parse(scheduledTime));
|
|
|
|
|
applicationUpdateBeanWrapper.getOperation().setSchedule(formattedScheduledDate);
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
String errorMessage = "Invalid date string is provided in for schedule parameter";
|
|
|
|
|
throw new BadRequestException(
|
|
|
|
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ApplicationUpdate applicationUpdate = applicationUpdateBeanWrapper.getOperation();
|
|
|
|
|
validateApplicationUrl(applicationUpdate.getUrl());
|
|
|
|
|
validateApplicationType(applicationUpdate.getType());
|
|
|
|
|