public interface LDAPUrl
"ldap[s]://" [ hostName [":" portNumber] ]
"/" distinguishedName
["?" attributeList
["?" scope "?" filterString ] ]
Where:
hostName and portNumber identify
the location of the LDAP server.
distinguishedName is the name of an entry within the
given directory (the entry represents the starting point of the search).
attributeList contains a list of attributes to
retrieve (if null, fetch all attributes). This is a comma-delimited list of
attribute names.
scope is one of the following:
base indicates that this is a search only for the specified
entry
one indicates that this is a search for matching entries one
level under the specified entry (and not including the entry itself)
sub indicates that this is a search for matching entries at
all levels under the specified entry (including the entry itself)
subordinates indicates that this is a search for matching
entries all levels under the specified entry (excluding the entry itself)
scope is base by default.
filterString is a human-readable representation of
the search criteria. If no filter is provided, then a default of "(objectClass=*)" should be assumed.
%HH, where HH represent the two hex
digits which correspond to the ASCII value of the character. This encoding is
only legal (or necessary) on the DN and filter portions of the URL.
Note that this class does not implement extensions.
Creation of LDAPUrl is provided by
newLDAPUrl(String)
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getAttributes()
Returns a list containing the attributes to be included with
each entry that matches the search criteria.
|
Filter |
getFilter()
Returns the search filter associated with this LDAP URL.
|
java.lang.String |
getHost()
Returns the name or IP address in dotted format of the LDAP server
referenced by this LDAP URL.
|
DN |
getName()
Returns the distinguished name of the base entry relative to which the
search is to be performed.
|
int |
getPort()
Returns the port number of the LDAP server referenced by this LDAP URL.
|
SearchScope |
getScope()
Returns the search scope associated with this LDAP URL.
|
boolean |
isSecure()
Returns
true if this LDAP URL should use LDAPS or false if
it should use LDAP. |
void |
setFilter(Filter filter)
Sets the search filter associated with this LDAP URL.
|
void |
setHost(java.lang.String host)
Sets the host associated with this LDAP URL.
|
void |
setName(DN name)
Sets the distinguished name of the base entry relative to which the
search is to be performed.
|
void |
setPort(int port)
Sets the port number of the LDAP server referenced by this LDAP URL.
|
void |
setScope(SearchScope searchScope)
Sets the search scope of the LDAP server referenced by this LDAP URL.
|
java.util.Set<java.lang.String> getAttributes()
Filter getFilter()
void setFilter(Filter filter) throws java.lang.IllegalArgumentException
filter - the search filterjava.lang.IllegalArgumentException - if the provided filter is invalid.java.lang.String getHost()
ldap.server1.com or
192.202.185.90. Use null for the local host.void setHost(java.lang.String host)
null for the local
host.host - the host associated with this LDAP URL.DN getName()
void setName(DN name) throws java.lang.IllegalArgumentException
name - the distinguished namejava.lang.IllegalArgumentException - if the provided Dn is invalid.int getPort()
void setPort(int port)
port - the port numberSearchScope getScope()
void setScope(SearchScope searchScope)
searchScope - the search scopeboolean isSecure()
true if this LDAP URL should use LDAPS or false if
it should use LDAP.true if this LDAP URL should use LDAPS or false if
it should use LDAP.