@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 PolicyEvaluationPoint getPEP() throws PolicyManagementException {
   return policyManagerService.getPEP();
 }