@Override
  public Policy getEffectivePolicy(DeviceIdentifier identifier) throws PolicyDelegationException {

    try {
      PolicyManagerService policyManagerService = new PolicyManagerServiceImpl();
      return policyManagerService.getPEP().getEffectivePolicy(identifier);
      // return
      // PolicyManagementDataHolder.getInstance().getPolicyEvaluationPoint().getEffectivePolicy(identifier);
    } catch (PolicyEvaluationException e) {
      String msg = "Error occurred while retrieving the effective policy for devices.";
      log.error(msg, e);
      throw new PolicyDelegationException(msg, e);
    } catch (PolicyManagementException e) {
      String msg = "Error occurred while retrieving the effective policy for devices.";
      log.error(msg, e);
      throw new PolicyDelegationException(msg, e);
    }
  }
 @Override
 public PolicyAdministratorPoint getPAP() throws PolicyManagementException {
   return policyManagerService.getPAP();
 }
 @Override
 public List<Feature> getFeatures() throws FeatureManagementException {
   return policyManagerService.getFeatures();
 }
 @Override
 public List<Policy> getPolicies(String deviceType) throws PolicyManagementException {
   return policyManagerService.getPolicies(deviceType);
 }
 @Override
 public List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier)
     throws FeatureManagementException {
   return policyManagerService.getEffectiveFeatures(deviceIdentifier);
 }
 @Override
 public Policy getEffectivePolicy(DeviceIdentifier deviceIdentifier)
     throws PolicyManagementException {
   return policyManagerService.getEffectivePolicy(deviceIdentifier);
 }
 @Override
 public boolean deletePolicy(int policyId) throws PolicyManagementException {
   return policyManagerService.deletePolicy(policyId);
 }
 @Override
 public Policy updatePolicy(Policy policy) throws PolicyManagementException {
   return policyManagerService.updatePolicy(policy);
 }
 @Override
 public Profile updateProfile(Profile profile) throws PolicyManagementException {
   return policyManagerService.updateProfile(profile);
 }
 @Override
 public boolean isCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
   return policyManagerService.isCompliance(deviceIdentifier);
 }
 @Override
 public ComplianceData getDeviceCompliance(DeviceIdentifier deviceIdentifier)
     throws PolicyComplianceException {
   return policyManagerService.getDeviceCompliance(deviceIdentifier);
 }
 @Override
 public boolean checkCompliance(DeviceIdentifier deviceIdentifier, Object response)
     throws PolicyComplianceException {
   return policyManagerService.checkCompliance(deviceIdentifier, response);
 }
 @Override
 public List<ComplianceFeature> CheckPolicyCompliance(
     DeviceIdentifier deviceIdentifier, Object deviceResponse) throws PolicyComplianceException {
   return policyManagerService.CheckPolicyCompliance(deviceIdentifier, deviceResponse);
 }
 @Override
 public int getPolicyCount() throws PolicyManagementException {
   return policyManagerService.getPolicyCount();
 }
 @Override
 public PolicyEvaluationPoint getPEP() throws PolicyManagementException {
   return policyManagerService.getPEP();
 }
 @Override
 public PolicyInformationPoint getPIP() throws PolicyManagementException {
   return policyManagerService.getPIP();
 }