|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.util.LdapDirectory
Represents an LDAP directory object.
This class exposes methods for retrieving instances of LdapEntry either via a search or empty LdapEntry objects that can be used to create new LDAP objects.
LdapEntry
,
Url
Field Summary | |
(package private) Url |
url
|
Constructor Summary | |
LdapDirectory(String url)
Constructs an Ldapdirectory from a String URL. |
|
LdapDirectory(String host,
int port)
Constructs an LdapDirectory pointing to a particular host and port. |
|
LdapDirectory(Url u)
Constructs an LdapDirectory from a Url object. |
Method Summary | |
LdapEntry[] |
find(String scope,
String filter)
Searches the the directory from its root. |
LdapEntry[] |
find(String base,
String scope,
String filter)
Searches the the directory from a specific base DN. |
String |
getBaseDn()
Gets the base DN. |
LdapEntry |
getEntry(String dn)
Gets the LdapEntry found at dn. |
String |
getProviderUrl()
Gets the provider URL used by this directory. |
LdapEntry |
lookup(String dn)
Looks up a single entry by DN. |
LdapEntry |
newEntry()
Constructs an empty LdapEntry object. |
void |
setBaseDn(String dn)
Sets the base DN. |
void |
setPassword(String pw)
Sets the password for the principal. |
void |
setPrincipal(String dn)
Sets the LDAP principal that should be used for operations. |
String |
toString()
Gets the String representation of this LdapDirectory (its underlying URL). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Url url
Constructor Detail |
public LdapDirectory(Url u)
u
- The Url object.Url
public LdapDirectory(String url)
url
- The string URL.public LdapDirectory(String host, int port)
host
- The host where the LDAP server resides.port
- The port where the LDAP server is listening.Method Detail |
public void setBaseDn(String dn)
dn
- The new base DN.public String getBaseDn()
public void setPrincipal(String dn)
dn
- The principal's DN.setPassword(String)
public void setPassword(String pw)
pw
- The password.setPrincipal(String)
public String getProviderUrl()
public LdapEntry getEntry(String dn)
dn
- The LdapEntry's DN.
LdapEntry
public LdapEntry newEntry()
LdapEntry
public LdapEntry[] find(String scope, String filter)
scope
- The scope that should be used for the search (e.g. 'sub', 'base', 'one').filter
- The search filter that should be used (e.g. '(objectClass=*)'.
LdapEntry
public LdapEntry[] find(String base, String scope, String filter)
base
- The DN from where the search should be performed.scope
- The scope that should be used for the search (e.g. 'sub', 'base', 'one').filter
- The search filter that should be used (e.g. '(objectClass=*)'.
LdapEntry
public LdapEntry lookup(String dn)
dn
- The DN of the entry to retrieve.
LdapEntry
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |