@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class LDAPURL extends Object
Modifier and Type | Field and Description |
---|---|
static 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.
|
Constructor and Description |
---|
LDAPURL(String scheme,
String host,
int port,
org.forgerock.opendj.ldap.Dn baseDN,
LinkedHashSet<String> attributes,
org.forgerock.opendj.ldap.SearchScope scope,
SearchFilter filter,
List<String> extensions)
Creates a new LDAP URL with the provided information.
|
LDAPURL(String scheme,
String host,
int port,
String rawBaseDN,
LinkedHashSet<String> attributes,
org.forgerock.opendj.ldap.SearchScope scope,
String rawFilter,
List<String> extensions)
Creates a new LDAP URL with the provided information.
|
Modifier and Type | Method and Description |
---|---|
static LDAPURL |
decode(String url,
boolean fullyDecode)
Decodes the provided string as an LDAP URL.
|
boolean |
equals(Object o)
Indicates whether the provided object is equal to this LDAP URL.
|
LinkedHashSet<String> |
getAttributes()
Retrieves the set of attributes for this LDAP URL.
|
org.forgerock.opendj.ldap.Dn |
getBaseDN()
Retrieves the processed DN for this LDAP URL.
|
List<String> |
getExtensions()
Retrieves the set of extensions for this LDAP URL.
|
SearchFilter |
getFilter()
Retrieves the processed search filter for this LDAP URL.
|
String |
getHost()
Retrieves the host for this LDAP URL.
|
int |
getPort()
Retrieves the port for this LDAP URL.
|
String |
getRawBaseDN()
Retrieve the raw, unprocessed base DN for this LDAP URL.
|
String |
getRawFilter()
Retrieves the raw, unprocessed search filter for this LDAP URL.
|
String |
getScheme()
Retrieves the scheme for this LDAP URL.
|
org.forgerock.opendj.ldap.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(org.forgerock.opendj.ldap.Dn baseDN)
Specifies the base DN for this LDAP URL.
|
void |
setFilter(SearchFilter filter)
Specifies the search filter for this LDAP URL.
|
void |
setHost(String host)
Specifies the host for this LDAP URL.
|
void |
setPort(int port)
Specifies the port for this LDAP URL.
|
void |
setRawBaseDN(String rawBaseDN)
Specifies the raw, unprocessed base DN for this LDAP URL.
|
void |
setRawFilter(String rawFilter)
Specifies the raw, unprocessed search filter for this LDAP URL.
|
void |
setScheme(String scheme)
Specifies the scheme for this LDAP URL.
|
void |
setScope(org.forgerock.opendj.ldap.SearchScope scope)
Specifies the search scope for this LDAP URL.
|
String |
toString()
Retrieves a string representation of this LDAP URL.
|
void |
toString(StringBuilder buffer,
boolean baseOnly)
Appends a string representation of this LDAP URL to the provided buffer.
|
public static final String DEFAULT_SCHEME
public static final SearchFilter DEFAULT_SEARCH_FILTER
public LDAPURL(String scheme, String host, int port, String rawBaseDN, LinkedHashSet<String> attributes, org.forgerock.opendj.ldap.SearchScope scope, String rawFilter, List<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(String scheme, String host, int port, org.forgerock.opendj.ldap.Dn baseDN, LinkedHashSet<String> attributes, org.forgerock.opendj.ldap.SearchScope scope, SearchFilter filter, List<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.public static LDAPURL decode(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 String getScheme()
public void setScheme(String scheme)
scheme
- The scheme for this LDAP URL.public String getHost()
null
if none was provided.public void setHost(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 String getRawBaseDN()
null
if none was given (in which case a
default of the null DN "" should be assumed).public void setRawBaseDN(String rawBaseDN)
rawBaseDN
- The raw, unprocessed base DN for this LDAP URL.public org.forgerock.opendj.ldap.Dn getBaseDN() throws DirectoryException
DirectoryException
- If the raw base DN cannot be decoded as a valid DN.public void setBaseDN(org.forgerock.opendj.ldap.Dn baseDN)
baseDN
- The base DN for this LDAP URL.public LinkedHashSet<String> getAttributes()
public org.forgerock.opendj.ldap.SearchScope getScope()
null
if none was given (in which case the base-level
scope should be assumed).public void setScope(org.forgerock.opendj.ldap.SearchScope scope)
scope
- The search scope for this LDAP URL.public String getRawFilter()
null
if none was given (in which
case a default filter of "(objectClass=*)" should be assumed).public void setRawFilter(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 List<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(Object o)
public int hashCode()
public String toString()
public void toString(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.Copyright © 2010–2017 ForgeRock AS. All rights reserved.