public boolean isAffiliateMember(String realm,String providerID,String affiliationID) throws IDFFMetaException {
  boolean isAffiliateMember=false;
  if ((realm == null) || (realm.length() == 0)) {
    realm=ROOT_REALM;
  }
  if (providerID != null && affiliationID != null) {
    Set entityIDSet=getAllEntities(realm);
    if (entityIDSet != null && !entityIDSet.isEmpty()) {
      Iterator entityIterator=entityIDSet.iterator();
      while (entityIterator.hasNext()) {
        String entityID=(String)entityIterator.next();
        AffiliationDescriptorType affDescriptor=getAffiliationDescriptor(realm,entityID);
        if (affDescriptor != null) {
          String affID=affDescriptor.getAffiliationID();
          if (affID != null && affID.equals(affiliationID)) {
            List affMemberList=affDescriptor.getAffiliateMember();
            if (affMemberList != null && !affMemberList.isEmpty() && affMemberList.contains(providerID)) {
              isAffiliateMember=true;
              break;
            }
          }
        }
      }
    }
  }
  String[] args={providerID,affiliationID,realm};
  LogUtil.access(Level.INFO,LogUtil.IS_AFFILIATE_MEMBER_SUCCEEDED,args);
  return isAffiliateMember;
}

public boolean isAffiliateMember ( String realm , String providerID , String affiliationID ) throws IDFFMetaException { boolean isAffiliateMember = false ; if ( ( realm == null ) || ( realm . length ( ) == 0 ) ) { realm = ROOT_REALM ; } if ( providerID != null && affiliationID != null ) { Set entityIDSet = getAllEntities ( realm ) ; if ( entityIDSet != null && ! entityIDSet . isEmpty ( ) ) { Iterator entityIterator = entityIDSet . iterator ( ) ; while ( entityIterator . hasNext ( ) ) { String entityID = ( String ) entityIterator . next ( ) ; AffiliationDescriptorType affDescriptor = getAffiliationDescriptor ( realm , entityID ) ; if ( affDescriptor != null ) { String affID = affDescriptor . getAffiliationID ( ) ; if ( affID != null && affID . equals ( affiliationID ) ) { List affMemberList = affDescriptor . getAffiliateMember ( ) ; if ( affMemberList != null && ! affMemberList . isEmpty ( ) && affMemberList . contains ( providerID ) ) { isAffiliateMember = true ; break ; } } } } } } String [ ] args = { providerID , affiliationID , realm } ; LogUtil . access ( Level . INFO , LogUtil . IS_AFFILIATE_MEMBER_SUCCEEDED , args ) ; return isAffiliateMember ; }
checks if the provider is a member of the affiliation .
