From 8d52735e6ad21ecfc15da2ee98052b5e732fba5b Mon Sep 17 00:00:00 2001 From: Kasun Delgolla Date: Tue, 20 Oct 2015 09:51:43 +0530 Subject: [PATCH] Adding app list + info to monitoring operation --- .../mgt/core/mgt/impl/MonitoringManagerImpl.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java index 75350b3fdcc..f6d14166a4a 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java @@ -62,6 +62,8 @@ public class MonitoringManagerImpl implements MonitoringManager { private static final Log log = LogFactory.getLog(MonitoringManagerImpl.class); private static final String OPERATION_MONITOR = "MONITOR"; + private static final String OPERATION_INFO = "DEVICE_INFO"; + private static final String OPERATION_APP_LIST = "APPLICATION_LIST"; public MonitoringManagerImpl() { this.policyDAO = PolicyManagementDAOFactory.getPolicyDAO(); @@ -378,9 +380,19 @@ public class MonitoringManagerImpl implements MonitoringManager { monitoringOperation.setEnabled(true); monitoringOperation.setType(Operation.Type.COMMAND); monitoringOperation.setCode(OPERATION_MONITOR); + CommandOperation infoOperation = new CommandOperation(); + infoOperation.setEnabled(true); + infoOperation.setType(Operation.Type.COMMAND); + infoOperation.setCode(OPERATION_INFO); + CommandOperation appListOperation = new CommandOperation(); + appListOperation.setEnabled(true); + appListOperation.setType(Operation.Type.COMMAND); + appListOperation.setCode(OPERATION_APP_LIST); DeviceManagementProviderService service = new DeviceManagementProviderServiceImpl(); service.addOperation(monitoringOperation, deviceIdentifiers); + service.addOperation(infoOperation, deviceIdentifiers); + service.addOperation(appListOperation, deviceIdentifiers); } private List getDeviceIdentifiersFromDevices(List devices) {