Esempio n. 1
0
  /**
   * Returns the extended Policy Decision Point Configuration.
   *
   * @param realm the realm of the entity.
   * @param pdpEntityId identifier of the PDP.
   * @return the <code>XACMLPDPConfigElement</code> object.
   * @exception <code>SAML2Exception</code> if there is an error retreiving the extended
   *     configuration.
   */
  private static XACMLPDPConfigElement getPDPConfig(String realm, String pdpEntityID)
      throws SAML2Exception {

    XACMLPDPConfigElement pdpConfig = null;
    String classMethod = "QueryClient:getPDPConfig";
    if (saml2MetaManager != null) {
      try {
        pdpConfig = saml2MetaManager.getPolicyDecisionPointConfig(realm, pdpEntityID);
      } catch (SAML2MetaException sme) {
        if (debug.messageEnabled()) {
          debug.message(classMethod + "Error retreiving PDP meta", sme);
        }
        String[] args = {pdpEntityID};
        LogUtil.error(Level.INFO, LogUtil.PEP_METADATA_ERROR, args);
        throw new SAML2Exception(SAML2SDKUtils.BUNDLE_NAME, "pdpMetaRetreivalError", args);
      }
    }
    return pdpConfig;
  }