diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java index b8c72b619ad..13711f43b0f 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java @@ -87,10 +87,8 @@ public class PolicyManagementServiceComponent { componentContext.getBundleContext().registerService( PolicyManagerService.class.getName(), new PolicyManagerServiceImpl(), null); - - - PolicyConfiguration policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(). - getDeviceManagementConfigRepository().getPolicyConfiguration(); + PolicyConfiguration policyConfiguration = + DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration(); if(policyConfiguration.getMonitoringEnable()) { TaskScheduleService taskScheduleService = new TaskScheduleServiceImpl(); taskScheduleService.startTask(PolicyManagerUtil.getMonitoringFequency()); @@ -104,8 +102,8 @@ public class PolicyManagementServiceComponent { @SuppressWarnings("unused") protected void deactivate(ComponentContext componentContext) { try { - PolicyConfiguration policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(). - getDeviceManagementConfigRepository().getPolicyConfiguration(); + PolicyConfiguration policyConfiguration = + DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration(); if (policyConfiguration.getMonitoringEnable()) { TaskScheduleService taskScheduleService = new TaskScheduleServiceImpl(); taskScheduleService.stopTask(); 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 fa5e8ae7f31..9f6df4969c5 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 @@ -72,9 +72,8 @@ public class MonitoringManagerImpl implements MonitoringManager { this.deviceTypeDAO = DeviceManagementDAOFactory.getDeviceTypeDAO(); this.monitoringDAO = PolicyManagementDAOFactory.getMonitoringDAO(); this.complianceDecisionPoint = new ComplianceDecisionPointImpl(); - this.policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(). - getDeviceManagementConfigRepository().getPolicyConfiguration(); - + this.policyConfiguration = + DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration(); } @Override diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/TaskScheduleServiceImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/TaskScheduleServiceImpl.java index 04fac4505cd..75a58da1e89 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/TaskScheduleServiceImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/TaskScheduleServiceImpl.java @@ -43,8 +43,8 @@ public class TaskScheduleServiceImpl implements TaskScheduleService { public TaskScheduleServiceImpl() { - this.policyConfiguration = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(). - getDeviceManagementConfigRepository().getPolicyConfiguration(); + this.policyConfiguration = + DeviceConfigurationManager.getInstance().getDeviceManagementConfig().getPolicyConfiguration(); } @Override diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java index 26fd3db790e..56b52a3290e 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java @@ -218,7 +218,7 @@ public class PolicyManagerUtil { if (monitoringFrequency == 0) { PolicyConfiguration policyConfiguration = DeviceConfigurationManager.getInstance(). - getDeviceManagementConfig().getDeviceManagementConfigRepository().getPolicyConfiguration(); + getDeviceManagementConfig().getPolicyConfiguration(); monitoringFrequency = policyConfiguration.getMonitoringFrequency(); }