|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.util.Url
Parses an LDAP URL into it's parts.
The url can be modified using setters turned back into a complete URL retrieved using the toString() method. Copies can be made using the clone() method.
from rfc 2255:
ldapurl = scheme "://" [hostport] ["/" [dn ["?" [attributes] ["?" [scope] ["?" [filter] ["?" extensions]]]]]] scheme = "ldap" attributes = attrdesc *("," attrdesc) scope = "base" / "one" / "sub" dn = distinguishedName from Section 3 of [1] hostport = hostport from Section 5 of RFC 1738 [5] attrdesc = AttributeDescription from Section 4.1.5 of [2] filter = filter from Section 4 of [4] extensions = extension *("," extension) extension = ["!"] extype ["=" exvalue] extype = token / xtoken exvalue = LDAPString from section 4.1.2 of [2] token = oid from section 4.1 of [3] xtoken = ("X-" / "x-") token
Field Summary | |
private String |
attributes
|
private int[] |
defaultPorts
|
private String |
dn
|
private String |
extensions
|
private String |
filter
|
private String |
host
|
private int |
port
|
private String |
principal
|
private String |
scheme
|
private String[] |
schemes
|
private String |
scope
|
private String |
secret
|
Constructor Summary | |
Url()
Creates an empty url. |
|
Url(String url)
Creates a new url from a string url. |
Method Summary | |
Object |
clone()
Makes a copy of this Url. |
static String |
decodeUrl(String encoded)
Decodes a URL-encoded string. |
String |
getAttributes()
Gets the current attributes portion of this url. |
String |
getDn()
Gets the dn. |
String |
getExtensions()
Gets the extensions. |
String |
getFilter()
Gets the search filter. |
String |
getHost()
Gets the host. |
int |
getPort()
Gets the current port. |
String |
getPrincipal()
Gets the current principal. |
String |
getProviderUrl()
Convenience method get url up to hostport. |
String |
getScheme()
Gets the current scheme. |
String |
getScope()
Gets search scope. |
String |
getSecret()
Gets the current secret. |
boolean |
isDefaultPort()
Based on scheme returns true if the current port is the default port. |
void |
setAttributes(String attributes)
Sets attributes portion of this url. |
void |
setDn(String dn)
Sets the dn. |
void |
setExtensions(String extensions)
Sets the extensions. |
void |
setFilter(String filter)
Sets the search filter. |
void |
setHost(String host)
Sets the host. |
void |
setPort(int port)
Sets the port. |
void |
setPrincipal(String principal)
Sets the current principal. |
void |
setScheme(String scheme)
Sets the current scheme. |
void |
setScope(String scope)
Sets search scope. |
void |
setSecret(String secret)
Sets the current secret (password for principal). |
String |
toDisplayString()
Turns Url into a displayable string (without principal and secret). |
String |
toString()
Turns this Url into a string. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private String scheme
private String principal
private String secret
private String attributes
private String host
private int port
private String scope
private String filter
private String extensions
private String dn
private String[] schemes
private int[] defaultPorts
Constructor Detail |
public Url()
public Url(String url)
url
- The url to initialize from.Method Detail |
public String toString()
public String toDisplayString()
public Object clone()
public void setScheme(String scheme)
scheme
- The new schemepublic String getScheme()
public void setPrincipal(String principal)
principal
- The dn of the new principal.setSecret(String)
public String getPrincipal()
public void setSecret(String secret)
secret
- The new password.setPrincipal(String)
public String getSecret()
public void setAttributes(String attributes)
attributes
- The new attribute list (comma delimited list).public String getAttributes()
public void setHost(String host)
host
- The new host.setPort(int)
public String getHost()
public void setPort(int port)
port
- The new port.setHost(String)
public int getPort()
public void setScope(String scope)
scope
- The new search scope.setAttributes(String)
,
setFilter(String)
public String getScope()
public void setFilter(String filter)
filter
- The new search filter.setScope(String)
,
setAttributes(String)
public String getFilter()
public void setExtensions(String extensions)
extensions
- The new extensions.public String getExtensions()
public void setDn(String dn)
dn
- The new dn.public String getDn()
public boolean isDefaultPort()
public String getProviderUrl()
public static String decodeUrl(String encoded)
encoded
- URL-encoded string
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |