diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml index bc996646e14..9a71d330b0e 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml @@ -39,6 +39,7 @@ org.wso2.carbon.policy.mgt true + true 60000 5 8 diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml index ff6b302002b..a6fac0d5a7f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml @@ -49,6 +49,7 @@ org.wso2.carbon.policy.mgt true + true 60000 5 8 diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/operation/cdm-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/operation/cdm-config.xml index d4e1acb1397..4e72c2a0788 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/operation/cdm-config.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/operation/cdm-config.xml @@ -49,6 +49,7 @@ org.wso2.carbon.policy.mgt true + true 60000 5 8 diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/test/resources/carbon-home/repository/conf/cdm-config.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/test/resources/carbon-home/repository/conf/cdm-config.xml index bc48130dd52..a6e56949b83 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/test/resources/carbon-home/repository/conf/cdm-config.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/test/resources/carbon-home/repository/conf/cdm-config.xml @@ -54,6 +54,7 @@ org.wso2.carbon.policy.mgt true + true 60000 5 8 diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java index e00e1adcc9b..7f4f48415fb 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/PolicyManagerImpl.java @@ -44,9 +44,6 @@ import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderServiceImp import org.wso2.carbon.policy.mgt.common.*; import org.wso2.carbon.policy.mgt.core.cache.impl.PolicyCacheManagerImpl; import org.wso2.carbon.policy.mgt.core.dao.*; -import org.wso2.carbon.policy.mgt.core.enforcement.PolicyDelegationException; -import org.wso2.carbon.policy.mgt.core.enforcement.PolicyEnforcementDelegator; -import org.wso2.carbon.policy.mgt.core.enforcement.PolicyEnforcementDelegatorImpl; import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder; import org.wso2.carbon.policy.mgt.core.mgt.PolicyManager; import org.wso2.carbon.policy.mgt.core.mgt.ProfileManager; @@ -60,7 +57,6 @@ import java.util.*; public class PolicyManagerImpl implements PolicyManager { private PolicyDAO policyDAO; - private PolicyManager policyManager; private ProfileDAO profileDAO; private FeatureDAO featureDAO; private ProfileManager profileManager; @@ -73,7 +69,6 @@ public class PolicyManagerImpl implements PolicyManager { this.featureDAO = PolicyManagementDAOFactory.getFeatureDAO(); this.policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration(); this.profileManager = new ProfileManagerImpl(); - this.policyManager = new PolicyManagerImpl(); } @Override @@ -282,7 +277,7 @@ public class PolicyManagerImpl implements PolicyManager { if (policyConfiguration.getCacheEnable()) { existingPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies(); } else { - existingPolicies = policyManager.getPolicies(); + existingPolicies = this.getPolicies(); } PolicyManagementDAOFactory.beginTransaction(); bool = policyDAO.updatePolicyPriorities(policies); @@ -698,7 +693,7 @@ public class PolicyManagerImpl implements PolicyManager { if (policyConfiguration.getCacheEnable()) { tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies(); } else { - tempPolicyList = policyManager.getPolicies(); + tempPolicyList = this.getPolicies(); } for (Policy policy : tempPolicyList) { @@ -723,7 +718,7 @@ public class PolicyManagerImpl implements PolicyManager { if (policyConfiguration.getCacheEnable()) { allPolicies = PolicyCacheManagerImpl.getInstance().getAllPolicies(); } else { - allPolicies = policyManager.getPolicies(); + allPolicies = this.getPolicies(); } for (Policy policy : allPolicies) { @@ -770,7 +765,7 @@ public class PolicyManagerImpl implements PolicyManager { if (policyConfiguration.getCacheEnable()) { tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies(); } else { - tempPolicyList = policyManager.getPolicies(); + tempPolicyList = this.getPolicies(); } for (Policy policy : tempPolicyList) { @@ -805,7 +800,7 @@ public class PolicyManagerImpl implements PolicyManager { if (policyConfiguration.getCacheEnable()) { tempPolicyList = PolicyCacheManagerImpl.getInstance().getAllPolicies(); } else { - tempPolicyList = policyManager.getPolicies(); + tempPolicyList = this.getPolicies(); } for (Policy policy : tempPolicyList) { diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml index df960ed64ec..9213b378270 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/resources/carbon-home/repository/conf/cdm-config.xml @@ -39,6 +39,7 @@ org.wso2.carbon.policy.mgt true + true 60000 5 8 diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml index 81dd4812194..59ce0c0c9af 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/cdm-config.xml @@ -54,6 +54,7 @@ org.wso2.carbon.policy.mgt true + true 60000 5 8