|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LDAPProviderIF
The LDAPProviderIF interface defines a simple Java "wrapper" interface into an LDAP
directory. Any class implementing the LDAPProviderIF interface
is expected to take care of formatting and communication of LDAP query commands along with basic
LDAP attribute parsing.
The LDAPProvider class included in this SDK is an implementation of the
LDAPProviderIF interface.
LDAPProvider| Method Summary | |
|---|---|
java.lang.String |
getAttributeValue(java.lang.String attrName)
This method searches the previous LDAP sendReqest result looking for the
first child node with the specified LDAP attribute and returns the value (the first value
if multiple values exist) of that attribute. |
java.lang.String[] |
getAttributeValues(java.lang.String attrName)
This method searches the previous LDAP sendReqest result looking for the
first child node with the specified LDAP attribute and returns the values of that attribute. |
java.util.Vector |
sendRequest(java.lang.String searchBase,
java.util.HashMap matchRules,
boolean ignoreCase,
java.lang.String[] returnAttrs)
This method performs an LDAP query based on the specified parameters and returns the result as a Vector of HashMaps. |
java.util.Vector |
sendRequest(java.lang.String searchBase,
java.lang.String filter,
boolean ignoreCase,
java.lang.String[] returnAttrs)
|
| Method Detail |
|---|
java.lang.String getAttributeValue(java.lang.String attrName)
sendReqest result looking for the
first child node with the specified LDAP attribute and returns the value (the first value
if multiple values exist) of that attribute.
The sendReqest MUST always be called first to populate the search result - otherwise
this method will always return null.
attrName - The String name of the desired attribute (Example: telephoneNumber);
null will be returned.java.lang.String[] getAttributeValues(java.lang.String attrName)
sendReqest result looking for the
first child node with the specified LDAP attribute and returns the values of that attribute.
The sendReqest MUST always be called first to populate the search result - otherwise
this method will always return null.
attrName - The String name of the desired attribute (Example: ciscoCCNatControlDevices);
null will be returned.
java.util.Vector sendRequest(java.lang.String searchBase,
java.util.HashMap matchRules,
boolean ignoreCase,
java.lang.String[] returnAttrs)
LDAPProviderIF object for
subsequent getAttributeValue requests - these methods provide a simple method of extracting
attribute values without the need to parse the Vector of HashMaps returned by this method.
The implementing LDAPProviderIF class must be fully initialized prior to calling this
method, but the initialization is not specified by the interface and is implementation-specific.
searchBase - The LDAP Search Base to be used for this search (Example: ou=Users)matchRules - A HashMap containing attribute String names (the HashMap keys) and their String values. These filters limit the search results to only those nodes which match the specified criteria. A value of null will specify that no filtering is applied.
(Example: sn=Stearns, givenName=Kelly)ignoreCase - boolean value indicating whether or not the search should be case-sensitive. If true, the search ignores case.returnAttrs - an Array of Strings indicating which attributes should be returned in the result. A value of null will specify ALL attributes.
(Example: sn, givenName, telephoneNumber)
User class in this SDK
for an example of how to extract information from this result.User
java.util.Vector sendRequest(java.lang.String searchBase,
java.lang.String filter,
boolean ignoreCase,
java.lang.String[] returnAttrs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||