oracle.ldap.util
Class Group

java.lang.Object
  |
  +--oracle.ldap.util.Group

public class Group
extends java.lang.Object


Constructor Summary
Group(int inGroupIdType, java.lang.String inGroupIdName)
          Constructs a Group using a group ID along with its type
 
Method Summary
 java.lang.String getDn(javax.naming.directory.DirContext ctx)
          Return the DN of this group.
 PropertySetCollection getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList)
          Retrieves selected attributes associated with this group.
 boolean isMember(javax.naming.directory.DirContext ctx, User user, boolean nested)
          Check if a particular user is a member of this group
 void resolve(javax.naming.directory.DirContext ctx)
          Validates the group by identifying its DN
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Group

public Group(int inGroupIdType,
             java.lang.String inGroupIdName)
      throws UtilException
Constructs a Group using a group ID along with its type
Parameters:
inGroupIdType - The type of group ID being used - either Util.IDTYPE_DN or Util.IDTYPE_GUID
inGroupIdName - the Group ID
Throws:
UtilException -  
Method Detail

getProperties

public PropertySetCollection getProperties(javax.naming.directory.DirContext ctx,
                                           java.lang.String[] attrList)
                                    throws UtilException
Retrieves selected attributes associated with this group.
Parameters:
ctx - A valid DirContext
attrList - An array of attributes to be retrieved. null indicates that all attributes should be retrieved. An empty array indicates that none should be retrieved.
Returns:
A PropertySetCollection of the results.
Throws:
UtilException -  

resolve

public void resolve(javax.naming.directory.DirContext ctx)
             throws UtilException
Validates the group by identifying its DN
Parameters:
ctx - A valid DirContext
Throws:
UtilException -  

getDn

public java.lang.String getDn(javax.naming.directory.DirContext ctx)
                       throws UtilException
Return the DN of this group.
Returns:
The DN of this group.
Throws:
UtilException -  

isMember

public boolean isMember(javax.naming.directory.DirContext ctx,
                        User user,
                        boolean nested)
                 throws UtilException
Check if a particular user is a member of this group
Parameters:
ctx - A valid DirContext
group - A valid User object
nested - Set to true if nested memberships are allowed. Otherwise, only direct memberships are considered
Returns:
true if the given user is a member of this group; false otherwise.
Throws:
UtilException -