From a4e6b02e60fcdbffa86ef4ede39d7e9c63c28da0 Mon Sep 17 00:00:00 2001 From: manoj Date: Sat, 30 May 2015 00:42:46 +0530 Subject: [PATCH] Add operation type for policy operation --- .../wso2/carbon/device/mgt/common/operation/mgt/Operation.java | 2 +- .../wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java index ce2c5e1ce4..82f6039442 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java @@ -27,7 +27,7 @@ import java.util.Properties; public class Operation implements Serializable { public enum Type { - CONFIG, MESSAGE, INFO, COMMAND, PROFILE + CONFIG, MESSAGE, INFO, COMMAND, PROFILE, POLICY } public enum Status { diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java index 2f7f05767f..def8edeb78 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java @@ -33,6 +33,7 @@ import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder; import org.wso2.carbon.policy.mgt.core.util.PolicyManagementConstants; import java.util.ArrayList; +import java.util.Date; import java.util.List; public class PolicyManagerServiceImpl implements PolicyManagerService { @@ -101,6 +102,8 @@ public class PolicyManagerServiceImpl implements PolicyManagerService { List profileOperationList = new ArrayList(); PolicyOperation policyOperation = new PolicyOperation(); + policyOperation.setEnabled(true); + policyOperation.setType(Operation.Type.POLICY); for (ProfileFeature feature : effectiveFeatures) { ProfileOperation profileOperation = new ProfileOperation();