Merge branch 'carbon-kernel-4.4.3' of https://github.com/wso2/carbon-device-mgt-plugins into carbon-kernel-4.4.3

# Conflicts:
#	components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationInstallation.java
(cherry picked from commit 257d6cd)
revert-dabc3590
charitha 8 years ago
parent ba2acb5e75
commit 9886e2e75f

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

Loading…
Cancel
Save