From 9068a3d8931d8b85c080ac81cb75191d896005ca Mon Sep 17 00:00:00 2001 From: prabathabey Date: Tue, 26 Apr 2016 16:40:30 +0530 Subject: [PATCH] Fixing compilation failures caused due to API changes --- .../internal/PolicyManagementServiceComponent.java | 10 ++++------ .../mgt/core/mgt/impl/MonitoringManagerImpl.java | 5 ++--- .../policy/mgt/core/task/TaskScheduleServiceImpl.java | 4 ++-- .../carbon/policy/mgt/core/util/PolicyManagerUtil.java | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) 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(); }