public class Group extends LDAPGroup
Constructor and Description |
---|
Group(int inGroupIdType,
java.lang.String inGroupIdName)
Constructs a Group using a group ID along with its type
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDn(javax.naming.directory.DirContext ctx)
Returns the DN of this group.
|
java.lang.String |
getGUID(javax.naming.directory.DirContext ctx)
Returns the GUID of the entry (resolves the name if necessary).
|
PropertySetCollection |
getProperties(javax.naming.directory.DirContext ctx,
java.lang.String[] attrList)
Returns the attributes specified from this group.
|
boolean |
isDirectUniqueMember(javax.naming.directory.DirContext ctx,
java.lang.String uDN) |
boolean |
isMember(javax.naming.directory.DirContext ctx,
java.lang.String userDN,
boolean nested)
Check if a particular user is a member of this group
|
boolean |
isMember(javax.naming.directory.DirContext ctx,
User user,
boolean nested)
Checks if a particular user is a member of this group.
|
boolean |
isNestedOwner(javax.naming.directory.DirContext ctx,
java.lang.String userDN) |
boolean |
isOwner(javax.naming.directory.DirContext ctx,
java.lang.String userDN,
boolean nested) |
void |
resolve(javax.naming.directory.DirContext ctx)
Validates the group by identifying its DN
|
addUniquemember, getAllUniquemembers, isUniquemember, removeUniquemember
getDN, getProperties, setProperties
public Group(int inGroupIdType, java.lang.String inGroupIdName) throws UtilException
inGroupIdType
- The type of group ID being used -
either Util.IDTYPE_DN or Util.IDTYPE_GUIDinGroupIdName
- the Group IDUtilException
public void resolve(javax.naming.directory.DirContext ctx) throws UtilException
resolve
in class LDAPEntry
ctx
- A valid DirContextUtilException
public boolean isMember(javax.naming.directory.DirContext ctx, User user, boolean nested) throws UtilException
Checks if a particular user is a member of this group. The method returns true if the user is a member of this group. Otherwise, it will return false.
ctx
- A valid DirContextuser
- A valid User objectnested
- Set to true if nested memberships are allowed.
Otherwise, only direct memberships are consideredUtilException
public boolean isOwner(javax.naming.directory.DirContext ctx, java.lang.String userDN, boolean nested) throws UtilException
UtilException
public boolean isNestedOwner(javax.naming.directory.DirContext ctx, java.lang.String userDN) throws UtilException
UtilException
public boolean isDirectUniqueMember(javax.naming.directory.DirContext ctx, java.lang.String uDN)
public boolean isMember(javax.naming.directory.DirContext ctx, java.lang.String userDN, boolean nested) throws UtilException
ctx
- A valid DirContextuserDN
- A valid User Distinguish Namenested
- Set to true if nested memberships are allowed.
Otherwise, only direct memberships are consideredUtilException
public java.lang.String getDn(javax.naming.directory.DirContext ctx) throws UtilException
ctx
- a valid DirContextUtilException
public PropertySetCollection getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList) throws UtilException
ctx
- a valid DirContextattrList
- an array of attributes to be returnedUtilException
public java.lang.String getGUID(javax.naming.directory.DirContext ctx) throws UtilException
ctx
- a valid DirContextUtilException