|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mentata.l3d.L3DContext
An association between an available directory service and objects.
Instances of this class are constructed by parsing a formatted text file named context.properties located in a package named for the context under com.mentata.l3d in the Java class hierarchy. It is defined by properties for identifying a directory server, configuring pool of connections to be used with the server, setting encryption standards for directory communication, characterizing authentication, associating a locale, and specifying an associated Java package of objects. Almost all options have defaults that work for simple situations, minimizing the need for their definition. An instance is immutable and offers limited access after its creation. A context is used for getting directory connections or instances of objects that are in an associated Java package.
| Field Summary | |
static String |
CONTEXT_CLASS
The explicit path for this parent class. |
static String |
CONTEXT_ROOT
The root class path for context packages. |
| Constructor Summary | |
L3DContext(String name)
Constructs a context using properties defined for the given name. |
|
| Method Summary | |
LDAPConnection |
getConnection()
Returns a standard connection to the directory. |
LDAPConnection |
getConnection(String user,
byte[] pwd)
Returns a connection to the directory bound as the given user. |
String |
getLabel()
Returns a display friendly label for the context. |
String |
getName()
Returns the name of the context. |
L3DObject |
getObject(String classname)
Returns an empty instance of the given object. |
L3DObject |
getObject(String classname,
String identifier)
Returns an instance of the object populated with the identified entry. |
L3DObject |
getObject(String classname,
String identifier,
String[] attributes)
Returns an instance of the object populated with the identified entry and attributes. |
protected ResourceBundle |
getProperties()
Returns the properties defined for the context. |
boolean |
isPooling()
Indicates if the context uses an anonymous connection pool. |
void |
returnConnection(LDAPConnection conn)
Returns a shared connection to the context. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String CONTEXT_ROOT
public static final String CONTEXT_CLASS
| Constructor Detail |
public L3DContext(String name)
throws L3DException
name - the name of the context
L3DException - if the properties file is undefined| Method Detail |
public String getName()
public String getLabel()
protected ResourceBundle getProperties()
throws L3DException
L3DException - if the properties file is undefinedpublic boolean isPooling()
public LDAPConnection getConnection()
throws L3DException
L3DException - if a pool cannot be created or a connection is unavailablepublic void returnConnection(LDAPConnection conn)
conn - a connection created by the context
public final LDAPConnection getConnection(String user,
byte[] pwd)
throws L3DException
user - the identifier or RDN attribute value for a user entrypwd - the user password as bytes
L3DException - if the given user cannot be found or authenticated
public final L3DObject getObject(String classname)
throws L3DException
classname - the class name of the object
L3DException - if the object is improperly defined
public final L3DObject getObject(String classname,
String identifier)
throws L3DException
classname - the class name of the objectidentifier - the identifier value for an entry
L3DException - if the object is improperly defined or the identifier is incorrect
public final L3DObject getObject(String classname,
String identifier,
String[] attributes)
throws L3DException
classname - the class name of the objectidentifier - the identifier value for an entryattributes - the attributes to populate
L3DException - if the object is improperly defined or the identifier is incorrect
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||