|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.LDAPURL
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class LDAPURL
This class defines a data structure that represents the components of an LDAP URL, including the scheme, host, port, base DN, attributes, scope, filter, and extensions. It has the ability to create an LDAP URL based on all of these individual components, as well as parsing them from their string representations.
Field Summary | |
---|---|
static DN |
DEFAULT_BASE_DN
The default base DN that will be used if none is provided. |
static int |
DEFAULT_PORT
The default port value that will be used if none is provided. |
static java.lang.String |
DEFAULT_SCHEME
The default scheme that will be used if none is provided. |
static SearchFilter |
DEFAULT_SEARCH_FILTER
The default search filter that will be used if none is provided. |
static SearchScope |
DEFAULT_SEARCH_SCOPE
The default search scope that will be used if none is provided. |
Constructor Summary | |
---|---|
LDAPURL(java.lang.String scheme,
java.lang.String host,
int port,
DN baseDN,
java.util.LinkedHashSet<java.lang.String> attributes,
SearchScope scope,
SearchFilter filter,
java.util.LinkedList<java.lang.String> extensions)
Creates a new LDAP URL with the provided information. |
|
LDAPURL(java.lang.String scheme,
java.lang.String host,
int port,
java.lang.String rawBaseDN,
java.util.LinkedHashSet<java.lang.String> attributes,
SearchScope scope,
java.lang.String rawFilter,
java.util.LinkedList<java.lang.String> extensions)
Creates a new LDAP URL with the provided information. |
Method Summary | |
---|---|
static LDAPURL |
decode(java.lang.String url,
boolean fullyDecode)
Decodes the provided string as an LDAP URL. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this LDAP URL. |
java.util.LinkedHashSet<java.lang.String> |
getAttributes()
Retrieves the set of attributes for this LDAP URL. |
DN |
getBaseDN()
Retrieves the processed DN for this LDAP URL. |
java.util.LinkedList<java.lang.String> |
getExtensions()
Retrieves the set of extensions for this LDAP URL. |
SearchFilter |
getFilter()
Retrieves the processed search filter for this LDAP URL. |
java.lang.String |
getHost()
Retrieves the host for this LDAP URL. |
int |
getPort()
Retrieves the port for this LDAP URL. |
java.lang.String |
getRawBaseDN()
Retrieve the raw, unprocessed base DN for this LDAP URL. |
java.lang.String |
getRawFilter()
Retrieves the raw, unprocessed search filter for this LDAP URL. |
java.lang.String |
getScheme()
Retrieves the scheme for this LDAP URL. |
SearchScope |
getScope()
Retrieves the search scope for this LDAP URL. |
int |
hashCode()
Retrieves the hash code for this LDAP URL. |
boolean |
matchesEntry(Entry entry)
Indicates whether the provided entry matches the criteria defined in this LDAP URL. |
void |
setBaseDN(DN baseDN)
Specifies the base DN for this LDAP URL. |
void |
setFilter(SearchFilter filter)
Specifies the search filter for this LDAP URL. |
void |
setHost(java.lang.String host)
Specifies the host for this LDAP URL. |
void |
setPort(int port)
Specifies the port for this LDAP URL. |
void |
setRawBaseDN(java.lang.String rawBaseDN)
Specifies the raw, unprocessed base DN for this LDAP URL. |
void |
setRawFilter(java.lang.String rawFilter)
Specifies the raw, unprocessed search filter for this LDAP URL. |
void |
setScheme(java.lang.String scheme)
Specifies the scheme for this LDAP URL. |
void |
setScope(SearchScope scope)
Specifies the search scope for this LDAP URL. |
java.lang.String |
toString()
Retrieves a string representation of this LDAP URL. |
void |
toString(java.lang.StringBuilder buffer,
boolean baseOnly)
Appends a string representation of this LDAP URL to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_SCHEME
public static final int DEFAULT_PORT
public static final DN DEFAULT_BASE_DN
public static final SearchScope DEFAULT_SEARCH_SCOPE
public static final SearchFilter DEFAULT_SEARCH_FILTER
Constructor Detail |
---|
public LDAPURL(java.lang.String scheme, java.lang.String host, int port, java.lang.String rawBaseDN, java.util.LinkedHashSet<java.lang.String> attributes, SearchScope scope, java.lang.String rawFilter, java.util.LinkedList<java.lang.String> extensions)
scheme
- The scheme (i.e., protocol) for this LDAP
URL.host
- The address for this LDAP URL.port
- The port number for this LDAP URL.rawBaseDN
- The raw base DN for this LDAP URL.attributes
- The set of requested attributes for this LDAP
URL.scope
- The search scope for this LDAP URL.rawFilter
- The string representation of the search
filter for this LDAP URL.extensions
- The set of extensions for this LDAP URL.public LDAPURL(java.lang.String scheme, java.lang.String host, int port, DN baseDN, java.util.LinkedHashSet<java.lang.String> attributes, SearchScope scope, SearchFilter filter, java.util.LinkedList<java.lang.String> extensions)
scheme
- The scheme (i.e., protocol) for this LDAP
URL.host
- The address for this LDAP URL.port
- The port number for this LDAP URL.baseDN
- The base DN for this LDAP URL.attributes
- The set of requested attributes for this LDAP
URL.scope
- The search scope for this LDAP URL.filter
- The search filter for this LDAP URL.extensions
- The set of extensions for this LDAP URL.Method Detail |
---|
public static LDAPURL decode(java.lang.String url, boolean fullyDecode) throws DirectoryException
url
- The URL string to be decoded.fullyDecode
- Indicates whether the URL should be fully
decoded (e.g., parsing the base DN and
search filter) or just leaving them in their
string representations. The latter may be
required for client-side use.
DirectoryException
- If a problem occurs while attempting
to decode the provided string as an
LDAP URL.public java.lang.String getScheme()
public void setScheme(java.lang.String scheme)
scheme
- The scheme for this LDAP URL.public java.lang.String getHost()
null
if none
was provided.public void setHost(java.lang.String host)
host
- The host for this LDAP URL.public int getPort()
public void setPort(int port)
port
- The port for this LDAP URL.public java.lang.String getRawBaseDN()
null
if none was given (in which case a
default of the null DN "" should be assumed).public void setRawBaseDN(java.lang.String rawBaseDN)
rawBaseDN
- The raw, unprocessed base DN for this LDAP
URL.public DN getBaseDN() throws DirectoryException
DirectoryException
- If the raw base DN cannot be decoded
as a valid DN.public void setBaseDN(DN baseDN)
baseDN
- The base DN for this LDAP URL.public java.util.LinkedHashSet<java.lang.String> getAttributes()
public SearchScope getScope()
null
if none was given (in which case the base-level scope
should be assumed).public void setScope(SearchScope scope)
scope
- The search scope for this LDAP URL.public java.lang.String getRawFilter()
null
if none was given (in which case a
default filter of "(objectClass=*)" should be assumed).public void setRawFilter(java.lang.String rawFilter)
rawFilter
- The raw, unprocessed search filter for this
LDAP URL.public SearchFilter getFilter() throws DirectoryException
DirectoryException
- If a problem occurs while attempting
to decode the raw filter.public void setFilter(SearchFilter filter)
filter
- The search filter for this LDAP URL.public java.util.LinkedList<java.lang.String> getExtensions()
public boolean matchesEntry(Entry entry) throws DirectoryException
entry
- The entry for which to make the determination.
true
if the provided entry does match the
criteria specified in this LDAP URL, or false
if
it does not.
DirectoryException
- If a problem occurs while attempting
to make the determination.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the object is equal to this LDAP
URL, or false
if not.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer, boolean baseOnly)
buffer
- The buffer to which the information is to be
appended.baseOnly
- Indicates whether the resulting URL string
should only include the portion up to the base
DN, omitting the attributes, scope, filter, and
extensions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |