public boolean isTrustedXACMLProvider(String realm,String entityId,String trustedEntityId,String role) throws SAML2MetaException {
  boolean result=false;
  if (role != null) {
    if (role.equals(SAML2Constants.PDP_ROLE)) {
      XACMLPDPConfigElement pdpConfig=getPolicyDecisionPointConfig(realm,entityId);
      if (pdpConfig != null) {
        result=isSameCircleOfTrust(pdpConfig,realm,trustedEntityId);
      }
    }
 else     if (role.equals(SAML2Constants.PEP_ROLE)) {
      XACMLAuthzDecisionQueryConfigElement pepConfig=getPolicyEnforcementPointConfig(realm,entityId);
      result=isSameCircleOfTrust(pepConfig,realm,trustedEntityId);
    }
  }
  return result;
}

public boolean isTrustedXACMLProvider ( String realm , String entityId , String trustedEntityId , String role ) throws SAML2MetaException { boolean result = false ; if ( role != null ) { if ( role . equals ( SAML2Constants . PDP_ROLE ) ) { XACMLPDPConfigElement pdpConfig = getPolicyDecisionPointConfig ( realm , entityId ) ; if ( pdpConfig != null ) { result = isSameCircleOfTrust ( pdpConfig , realm , trustedEntityId ) ; } } else if ( role . equals ( SAML2Constants . PEP_ROLE ) ) { XACMLAuthzDecisionQueryConfigElement pepConfig = getPolicyEnforcementPointConfig ( realm , entityId ) ; result = isSameCircleOfTrust ( pepConfig , realm , trustedEntityId ) ; } } return result ; }
determines whether two entities are in the same circle of trust under the realm . returns true if entities are in same circle of trust . the entity can be a pdp or a pep . if an entity role other then pep or pdp is specified then a false will be returned .
