|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jndi.ldap.obj.GroupOfNames
com.sun.jndi.ldap.obj.GroupOfUniqueNames
public class GroupOfUniqueNames
A representation of the LDAP groupOfUniqueNames object class. This is a static group: its members are listed in the group's uniqueMember LDAP attribute.
Note that when a GroupOfUniqueNames object is created by the
application program then most of its methods throw
IllegalStateException
until the program binds the object in the directory. However, when a
GroupOfUniqueNames object is returned to the application program
then the object is already bound in the directory and its methods function
normally.
A GroupOfUniqueNames instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a GroupOfUniqueNames should lock the object.
In order to bind a GroupOfUniqueNames object in the directory, the following LDAP object class definition (RFC 2256) must be supported in the directory schema:
( 2.5.6.17 NAME 'groupOfUniqueNames' SUP top STRUCTURAL MUST ( uniqueMember $ cn ) MAY ( businessCategory $ seeAlso $ owner $ ou $ o $ description ) )See
DirContext.bind
for details on binding an object in the directory.
The code sample in GroupOfNames
shows how the class may be used.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sun.jndi.ldap.obj.GroupOfNames |
---|
GroupOfNames.Members |
Field Summary | |
---|---|
private static boolean |
debug
|
private static java.lang.String |
MEMBER_ATTR_ID
|
private static java.lang.String |
MEMBER_FILTER_EXPR
|
private static java.lang.String |
OBJECT_CLASS
|
private static javax.naming.directory.Attribute |
OBJECT_CLASS_ATTR
|
Constructor Summary | |
---|---|
|
GroupOfUniqueNames()
Create an empty group object. |
|
GroupOfUniqueNames(java.util.Set members)
Create a group object with an initial set of members. |
private |
GroupOfUniqueNames(java.lang.String groupDN,
javax.naming.directory.DirContext ctx,
javax.naming.Name name,
java.util.Hashtable env,
javax.naming.directory.Attributes attributes)
|
Method Summary | |
---|---|
(package private) static java.lang.Object |
getObjectInstance(java.lang.String groupDN,
javax.naming.directory.DirContext ctx,
javax.naming.Name name,
java.util.Hashtable env,
javax.naming.directory.Attributes attributes)
Create a group object from its entry in the directory. |
(package private) static boolean |
matches(javax.naming.directory.Attribute objectClass)
Determines whether the supplied LDAP objectClass attribute matches that of the group. |
Methods inherited from class com.sun.jndi.ldap.obj.GroupOfNames |
---|
addMember, addMember, close, generateRootContextProperties, getAttributes, getName, isMember, isMember, members, removeMember, removeMember, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Principal |
---|
equals, hashCode |
Field Detail |
---|
private static final boolean debug
private static final java.lang.String OBJECT_CLASS
private static final java.lang.String MEMBER_ATTR_ID
private static final java.lang.String MEMBER_FILTER_EXPR
private static final javax.naming.directory.Attribute OBJECT_CLASS_ATTR
Constructor Detail |
---|
public GroupOfUniqueNames()
Note that the newly constructed object does not represent a group in
the directory until it is bound by using
DirContext.bind
.
public GroupOfUniqueNames(java.util.Set members)
Note that the newly constructed object does not represent a group in
the directory until it is bound by using
DirContext.bind
.
members
- The set of initial members. It may be null.
Each element is of class String
or
Principal
private GroupOfUniqueNames(java.lang.String groupDN, javax.naming.directory.DirContext ctx, javax.naming.Name name, java.util.Hashtable env, javax.naming.directory.Attributes attributes)
Method Detail |
---|
static java.lang.Object getObjectInstance(java.lang.String groupDN, javax.naming.directory.DirContext ctx, javax.naming.Name name, java.util.Hashtable env, javax.naming.directory.Attributes attributes)
LdapGroupFactory
groupDN
- The group's distinguished name.ctx
- An LDAP context.name
- The group's name relative to the context.env
- The context's environment properties.attributes
- The group's LDAP attributes.
static boolean matches(javax.naming.directory.Attribute objectClass)
objectClass
- The non-null objectClass attribute to check against.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |