From c0ffb0242056cfa6fcab9e5d4428a0dc2afe9913 Mon Sep 17 00:00:00 2001 From: amalhub Date: Tue, 10 Oct 2017 11:14:51 +0530 Subject: [PATCH] Code formatting --- .../mgt/core/impl/SubscriptionManagerImpl.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java index 17fce50c57a..bfe7a13e2a3 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/SubscriptionManagerImpl.java @@ -56,8 +56,8 @@ public class SubscriptionManagerImpl implements SubscriptionManager { } @Override - public List installApplicationForUsers(String applicationUUID, List userList, String versionName) - throws ApplicationManagementException { + public List installApplicationForUsers(String applicationUUID, List userList, + String versionName) throws ApplicationManagementException { log.info("Install application: " + applicationUUID + " to: " + userList.size() + " users."); List deviceList = new ArrayList<>(); for (String user : userList) { @@ -75,8 +75,8 @@ public class SubscriptionManagerImpl implements SubscriptionManager { } @Override - public List installApplicationForRoles(String applicationUUID, List roleList, String versionName) - throws ApplicationManagementException { + public List installApplicationForRoles(String applicationUUID, List roleList, + String versionName) throws ApplicationManagementException { log.info("Install application: " + applicationUUID + " to: " + roleList.size() + " roles."); List deviceList = new ArrayList<>(); for (String role : roleList) { @@ -100,12 +100,13 @@ public class SubscriptionManagerImpl implements SubscriptionManager { return null; } - private List installApplication(String applicationUUID, List deviceList, String versionName) - throws ApplicationManagementException { + private List installApplication(String applicationUUID, List deviceList, + String versionName) throws ApplicationManagementException { List failedDeviceList = new ArrayList<>(deviceList); // Todo: try whether we can optimise this by sending bulk inserts to db // Todo: atomicity is not maintained as deveice managment provider service uses separate db connection. fix this?? - log.info("Install application: " + applicationUUID + "[" + versionName + "]" + " to: " + deviceList.size() + " devices."); + log.info("Install application: " + applicationUUID + "[" + versionName + "]" + " to: " + + deviceList.size() + " devices."); for (DeviceIdentifier device : deviceList) { org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier = new org.wso2.carbon.device.mgt .common.DeviceIdentifier(device.getId(), device.getType()); @@ -123,7 +124,8 @@ public class SubscriptionManagerImpl implements SubscriptionManager { ProfileOperation operation = new ProfileOperation(); operation.setCode("INSTALL_APPLICATION"); operation.setType(Operation.Type.PROFILE); - operation.setPayLoad("{'type':'enterprise', 'url':'http://10.100.5.76:8000/app-debug.apk', 'app':'" + applicationUUID + "'}"); + operation.setPayLoad("{'type':'enterprise', 'url':'http://10.100.5.76:8000/app-debug.apk', 'app':'" + + applicationUUID + "'}"); List deviceIdentifiers = new ArrayList<>(); deviceIdentifiers.add(deviceIdentifier); dmpService.addOperation(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID,