|
|
@ -642,6 +642,16 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* This method is responsible to add operation on given devices.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param applicationDTO application.
|
|
|
|
|
|
|
|
* @param deviceIdentifierList list of device identifiers.
|
|
|
|
|
|
|
|
* @param deviceType device type
|
|
|
|
|
|
|
|
* @param action action e.g :- INSTALL, UNINSTALL
|
|
|
|
|
|
|
|
* @return {@link Activity}
|
|
|
|
|
|
|
|
* @throws ApplicationManagementException if found an invalid device.
|
|
|
|
|
|
|
|
*/
|
|
|
|
private Activity addAppOperationOnDevices(ApplicationDTO applicationDTO,
|
|
|
|
private Activity addAppOperationOnDevices(ApplicationDTO applicationDTO,
|
|
|
|
List<DeviceIdentifier> deviceIdentifierList, String deviceType, String action)
|
|
|
|
List<DeviceIdentifier> deviceIdentifierList, String deviceType, String action)
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
throws ApplicationManagementException {
|
|
|
@ -664,7 +674,6 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
private Operation generateOperationPayloadByDeviceType(String deviceType, Application application, String action)
|
|
|
|
private Operation generateOperationPayloadByDeviceType(String deviceType, Application application, String action)
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
throws ApplicationManagementException {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
//todo rethink and modify the {@link App} usage
|
|
|
|
|
|
|
|
if (ApplicationType.CUSTOM.toString().equalsIgnoreCase(application.getType())) {
|
|
|
|
if (ApplicationType.CUSTOM.toString().equalsIgnoreCase(application.getType())) {
|
|
|
|
ProfileOperation operation = new ProfileOperation();
|
|
|
|
ProfileOperation operation = new ProfileOperation();
|
|
|
|
if (SubAction.INSTALL.toString().equalsIgnoreCase(action)) {
|
|
|
|
if (SubAction.INSTALL.toString().equalsIgnoreCase(action)) {
|
|
|
@ -720,7 +729,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
return MDMIOSOperationUtil.createInstallAppOperation(app);
|
|
|
|
return MDMIOSOperationUtil.createInstallAppOperation(app);
|
|
|
|
} else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) {
|
|
|
|
} else if (SubAction.UNINSTALL.toString().equalsIgnoreCase(action)) {
|
|
|
|
app.setType(mobileAppType);
|
|
|
|
app.setType(mobileAppType);
|
|
|
|
app.setAppIdentifier(application.getPackageName());
|
|
|
|
app.setIdentifier(application.getPackageName());
|
|
|
|
return MDMIOSOperationUtil.createAppUninstallOperation(app);
|
|
|
|
return MDMIOSOperationUtil.createAppUninstallOperation(app);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
String msg = "Invalid Action is found. Action: " + action;
|
|
|
|
String msg = "Invalid Action is found. Action: " + action;
|
|
|
|