From 61888783406b6b4fea4d4ad847ed62d937db6002 Mon Sep 17 00:00:00 2001 From: manoj Date: Sat, 30 May 2015 00:51:58 +0530 Subject: [PATCH] Add operation code for policy operation --- .../carbon/device/mgt/core/operation/mgt/PolicyOperation.java | 1 + .../wso2/carbon/policy/mgt/core/PolicyManagerServiceImpl.java | 1 + 2 files changed, 2 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/PolicyOperation.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/PolicyOperation.java index d34905559d..de35173bef 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/PolicyOperation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/PolicyOperation.java @@ -28,6 +28,7 @@ public class PolicyOperation extends Operation { public List getProfileOperations() { return profileOperations; } + public static final String POLICY_OPERATION_CODE = "POLICY_BUNDLE"; public void setProfileOperations(List profileOperations) { this.profileOperations = profileOperations; 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 def8edeb78..76c5cccb91 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 @@ -104,6 +104,7 @@ public class PolicyManagerServiceImpl implements PolicyManagerService { PolicyOperation policyOperation = new PolicyOperation(); policyOperation.setEnabled(true); policyOperation.setType(Operation.Type.POLICY); + policyOperation.setCode(PolicyOperation.POLICY_OPERATION_CODE); for (ProfileFeature feature : effectiveFeatures) { ProfileOperation profileOperation = new ProfileOperation();