public boolean isMember ( Principal member ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isMember" , "is: " + member + ", a member of: " + this ) ; boolean result = false ; if ( member instanceof MPPrincipal ) { List theGroups = ( ( MPPrincipal ) member ) . getGroups ( ) ; if ( theGroups != null ) result = theGroups . contains ( getName ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isMember" , new Boolean ( result ) ) ; return result ; }
Returns true if the passed principal is a member of the group . This method does a recursive search so if a principal belongs to a group which is a member of this group true is returned .