Package org.ldaptive
Class LdapURL.Entry
- java.lang.Object
-
- org.ldaptive.LdapURL.Entry
-
-
Field Summary
Fields Modifier and Type Field Description protected static String[]
DEFAULT_ATTRIBUTES
Default return attributes, value is none.protected static String
DEFAULT_BASE_DN
Default base DN, value is "".protected static SearchFilter
DEFAULT_FILTER
Default search filter value is '(objectClass=*)'.protected static int
DEFAULT_LDAP_PORT
Default LDAP port, value is 389.protected static int
DEFAULT_LDAPS_PORT
Default LDAPS port, value is 636.protected static SearchScope
DEFAULT_SCOPE
Default scope, value isSearchScope.OBJECT
.private String[]
urlAttributes
Attributes of the ldap url.private String
urlBaseDn
Base DN of the ldap url.private SearchFilter
urlFilter
Search filter of the ldap url.private String
urlHostname
Hostname of the ldap url.private int
urlPort
Port of the ldap url.private String
urlScheme
Scheme of the ldap url.private SearchScope
urlScope
Search scope of the ldap url.
-
Constructor Summary
Constructors Constructor Description Entry(String scheme, String hostname, int port, String baseDn, String[] attributes, SearchScope scope, SearchFilter filter)
Creates a new entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getAttributes()
Returns the attributes.String
getBaseDn()
Returns the base DN.SearchFilter
getFilter()
Returns the filter.String
getHostname()
Returns the entryHostname.String
getHostnameWithPort()
Returns the hostname:port.String
getHostnameWithSchemeAndPort()
Returns the scheme://hostname:port.int
getPort()
Returns the entryPort.String
getScheme()
Returns the entryScheme.SearchScope
getScope()
Returns the scope.String
getUrl()
Returns the formatted URL as scheme://hostname:port/baseDn?attrs?scope?filter.boolean
isDefaultAttributes()
Returns whether attributes were supplied in this entry.boolean
isDefaultBaseDn()
Returns whether a base DN was supplied in this entry.boolean
isDefaultFilter()
Returns whether a filter was supplied in this entry.boolean
isDefaultPort()
Returns whether a port was supplied in this entry.boolean
isDefaultScope()
Returns whether a scope was supplied in this entry.String
toString()
-
-
-
Field Detail
-
DEFAULT_LDAP_PORT
protected static final int DEFAULT_LDAP_PORT
Default LDAP port, value is 389.- See Also:
- Constant Field Values
-
DEFAULT_LDAPS_PORT
protected static final int DEFAULT_LDAPS_PORT
Default LDAPS port, value is 636.- See Also:
- Constant Field Values
-
DEFAULT_BASE_DN
protected static final String DEFAULT_BASE_DN
Default base DN, value is "".- See Also:
- Constant Field Values
-
DEFAULT_FILTER
protected static final SearchFilter DEFAULT_FILTER
Default search filter value is '(objectClass=*)'.
-
DEFAULT_SCOPE
protected static final SearchScope DEFAULT_SCOPE
Default scope, value isSearchScope.OBJECT
.
-
DEFAULT_ATTRIBUTES
protected static final String[] DEFAULT_ATTRIBUTES
Default return attributes, value is none.
-
urlScheme
private final String urlScheme
Scheme of the ldap url.
-
urlHostname
private final String urlHostname
Hostname of the ldap url.
-
urlPort
private final int urlPort
Port of the ldap url.
-
urlBaseDn
private final String urlBaseDn
Base DN of the ldap url.
-
urlAttributes
private final String[] urlAttributes
Attributes of the ldap url.
-
urlScope
private final SearchScope urlScope
Search scope of the ldap url.
-
urlFilter
private final SearchFilter urlFilter
Search filter of the ldap url.
-
-
Constructor Detail
-
Entry
public Entry(String scheme, String hostname, int port, String baseDn, String[] attributes, SearchScope scope, SearchFilter filter)
Creates a new entry.- Parameters:
scheme
- entrySchemehostname
- entryHostnameport
- entryPortbaseDn
- base DNattributes
- attributesscope
- search scopefilter
- search filter
-
-
Method Detail
-
getScheme
public String getScheme()
Returns the entryScheme.- Returns:
- entryScheme
-
getHostname
public String getHostname()
Returns the entryHostname.- Returns:
- entryHostname
-
getPort
public int getPort()
Returns the entryPort.- Returns:
- entryPort
-
isDefaultPort
public boolean isDefaultPort()
Returns whether a port was supplied in this entry.- Returns:
- whether a port was supplied in this entry
-
getBaseDn
public String getBaseDn()
Returns the base DN.- Returns:
- baseDn
-
isDefaultBaseDn
public boolean isDefaultBaseDn()
Returns whether a base DN was supplied in this entry.- Returns:
- whether a base DN was supplied in this entry
-
getAttributes
public String[] getAttributes()
Returns the attributes.- Returns:
- attributes
-
isDefaultAttributes
public boolean isDefaultAttributes()
Returns whether attributes were supplied in this entry.- Returns:
- whether a attributes were supplied in this entry
-
getScope
public SearchScope getScope()
Returns the scope.- Returns:
- scope
-
isDefaultScope
public boolean isDefaultScope()
Returns whether a scope was supplied in this entry.- Returns:
- whether a scope was supplied in this entry
-
getFilter
public SearchFilter getFilter()
Returns the filter.- Returns:
- filter
-
isDefaultFilter
public boolean isDefaultFilter()
Returns whether a filter was supplied in this entry.- Returns:
- whether a filter was supplied in this entry
-
getUrl
public String getUrl()
Returns the formatted URL as scheme://hostname:port/baseDn?attrs?scope?filter.- Returns:
- url
-
getHostnameWithPort
public String getHostnameWithPort()
Returns the hostname:port.- Returns:
- hostname:port
-
getHostnameWithSchemeAndPort
public String getHostnameWithSchemeAndPort()
Returns the scheme://hostname:port.- Returns:
- scheme://hostname:port
-
-