public void updatePDPDescriptor(String realm,String entityName,Map attrValues) throws AMConsoleException {
  String[] params={realm,entityName,"SAMLv2","XACML PDP"};
  logEvent("ATTEMPT_MODIFY_ENTITY_DESCRIPTOR",params);
  try {
    SAML2MetaManager saml2Manager=getSAML2MetaManager();
    EntityDescriptorElement entityDescriptor=saml2Manager.getEntityDescriptor(realm,entityName);
    XACMLPDPDescriptorElement pdpDescriptor=saml2Manager.getPolicyDecisionPointDescriptor(realm,entityName);
    if (pdpDescriptor != null) {
      List authzServiceList=pdpDescriptor.getXACMLAuthzService();
      if (authzServiceList.size() != 0) {
        XACMLAuthzServiceElement authzService=(XACMLAuthzServiceElement)authzServiceList.get(0);
        authzService.setLocation((String)AMAdminUtils.getValue((Set)attrValues.get(ATTR_XACML_AUTHZ_SERVICE_LOCATION)));
      }
    }
    saml2Manager.setEntityDescriptor(realm,entityDescriptor);
    logEvent("SUCCEED_MODIFY_ENTITY_DESCRIPTOR",params);
  }
 catch (  SAML2MetaException e) {
    String strError=getErrorString(e);
    String[] paramsEx={realm,entityName,"SAMLv2","XACML PDP",strError};
    logEvent("FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR",paramsEx);
    throw new AMConsoleException(strError);
  }
}

public void updatePDPDescriptor ( String realm , String entityName , Map attrValues ) throws AMConsoleException { String [ ] params = { realm , entityName , "SAMLv2" , "XACML PDP" } ; logEvent ( "ATTEMPT_MODIFY_ENTITY_DESCRIPTOR" , params ) ; try { SAML2MetaManager saml2Manager = getSAML2MetaManager ( ) ; EntityDescriptorElement entityDescriptor = saml2Manager . getEntityDescriptor ( realm , entityName ) ; XACMLPDPDescriptorElement pdpDescriptor = saml2Manager . getPolicyDecisionPointDescriptor ( realm , entityName ) ; if ( pdpDescriptor != null ) { List authzServiceList = pdpDescriptor . getXACMLAuthzService ( ) ; if ( authzServiceList . size ( ) != 0 ) { XACMLAuthzServiceElement authzService = ( XACMLAuthzServiceElement ) authzServiceList . get ( 0 ) ; authzService . setLocation ( ( String ) AMAdminUtils . getValue ( ( Set ) attrValues . get ( ATTR_XACML_AUTHZ_SERVICE_LOCATION ) ) ) ; } } saml2Manager . setEntityDescriptor ( realm , entityDescriptor ) ; logEvent ( "SUCCEED_MODIFY_ENTITY_DESCRIPTOR" , params ) ; } catch ( SAML2MetaException e ) { String strError = getErrorString ( e ) ; String [ ] paramsEx = { realm , entityName , "SAMLv2" , "XACML PDP" , strError } ; logEvent ( "FEDERATION_EXCEPTION_MODIFY_ENTITY_DESCRIPTOR" , paramsEx ) ; throw new AMConsoleException ( strError ) ; } }
save standard metadata for pdp descriptor .
