|
LDAP Chai API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.novell.ldapchai.provider.ChaiConfiguration
public class ChaiConfiguration
LDAP Chai API configuration settings. This class represents the primary means
of controling Chai behavior. Instances of ChaiConfiguration are semi-mutable.
Once instantiated, the setters may be called to modify the instance. However, once lock() is
called, all setters will throw an IllegalStateException.
ChaiConfiguration instance is used to configure a new ChaiProvider
instance, it is automatically locked. Thus, a ChaiProvider's configuration can not be modifed
once it is used to create a ChaiProvider.
This class is cloneable and clones are created in an unlocked state.
ChaiSetting,
Serialized Form| Field Summary | |
|---|---|
static String |
LDAP_URL_SEPERATOR_REGEX_PATTERN
|
| Constructor Summary | |
|---|---|
ChaiConfiguration()
Construct a default ChaiConfiguration |
|
ChaiConfiguration(List<String> ldapURLs,
String bindDN,
String bindPassword)
Construct a default ChaiConfiguration |
|
ChaiConfiguration(String ldapURL,
String bindDN,
String bindPassword)
Construct a default ChaiConfiguration |
|
| Method Summary | |
|---|---|
List<String> |
bindURLsAsList()
Returns an immutable list of the ldap URLs. |
Object |
clone()
Clone this configuration and all of its settings, including the bind DN, password and ldap URLs. |
boolean |
getBooleanSetting(ChaiSetting setting)
Get an individual setting value and test it as a boolean |
static Properties |
getDefaultSettings()
Get a properties containing the default settings used by a newly constructed ChaiConfiguration. |
Object |
getImplementationConfiguration()
Return the current implementation configuration object. |
String |
getSetting(ChaiSetting setting)
Get an individual setting value |
Properties |
getSettings()
Get the current settings of the ChaiProvider. |
boolean |
isLocked()
Indicates the lock status of this ChaiConfiguration. |
void |
lock()
Lock this ChaiConfiguration. |
ChaiConfiguration |
setImplementationConfiguration(Serializable implementationConfiguration)
Set an object to be used for the ChaiProvider implementation to be used for its configuration. |
ChaiConfiguration |
setSetting(ChaiSetting setting,
String value)
Set a single settings. |
void |
setSettings(Properties settings)
Set the settings in the ChaiConfiguration. |
String |
toString()
Returns a string value suitable for debugging. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String LDAP_URL_SEPERATOR_REGEX_PATTERN
| Constructor Detail |
|---|
public ChaiConfiguration()
ChaiConfiguration
public ChaiConfiguration(List<String> ldapURLs,
String bindDN,
String bindPassword)
ChaiConfiguration
bindDN - ldap bind DN, in ldap fully qualified syntax. Also used as the DN of the returned ChaiUser.bindPassword - password for the bind DN.ldapURLs - an ordered list fo ldap server and port in url format, example: ldap://127.0.0.1:389
public ChaiConfiguration(String ldapURL,
String bindDN,
String bindPassword)
ChaiConfiguration
bindDN - ldap bind DN, in ldap fully qualified syntax. Also used as the DN of the returned ChaiUser.bindPassword - password for the bind DN.ldapURL - ldap server and port in url format, example: ldap://127.0.0.1:389| Method Detail |
|---|
public static Properties getDefaultSettings()
ChaiConfiguration.
public ChaiConfiguration setSetting(ChaiSetting setting,
String value)
ChaiSetting enumeration.
setting - the setting to setvalue - the value to set
ChaiConfiguration to facilitate chaining
IllegalArgumentException - if the value is not syntactically correctChaiSetting.validateValue(String)public Object getImplementationConfiguration()
public boolean isLocked()
ChaiConfiguration.
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String toString()
toString in class Objectpublic String getSetting(ChaiSetting setting)
setting - the setting to return
public boolean getBooleanSetting(ChaiSetting setting)
setting - the setting to return
public List<String> bindURLsAsList()
public Properties getSettings()
ChaiProvider.
public void lock()
ChaiConfiguration. Once locked, all of the setter methods will throw an IllegalStateException.
In order to be locked, both an implementation class and implementation configuration must be set.
public ChaiConfiguration setImplementationConfiguration(Serializable implementationConfiguration)
ChaiProvider implementation to be used for its configuration. Depending
on the implementation, this could be any type of object such as a Properties, Map, or even an implementation specific object.
When used with the default provider, JNDIProviderImpl, this object must be a Hashtable environment as specified by the
InitialLdapContext.
implementationConfiguration - an object suitable to be used as a configuration for whatever ChaiProvider implementation is to be used.
ChaiConfiguration to facilitate chainingpublic void setSettings(Properties settings)
ChaiConfiguration. Each setting key is available as a constant publicly defined by
ChaiConfiguration. The default settings are available in getDefaultSettings().
settings - a Properties containing settings to be used by the provider. If a setting is missing in the
supplied Properties, the current setting will be unchanged.
|
LDAP Chai API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||