All LDAP Classes
Internal LDAP Classes

org.ietf.ldap
Class LDAPUrl

java.lang.Object
  extended by org.ietf.ldap.LDAPUrl
All Implemented Interfaces:
java.lang.Cloneable

public class LDAPUrl
extends java.lang.Object
implements java.lang.Cloneable

Encapsulates parameters of an LDAP URL query as defined in RFC2255.

See Also:
com.novell.ldap.LDAPUrl

Field Summary
private  LDAPUrl url
           
 
Constructor Summary
LDAPUrl(LDAPUrl novellURL)
          This constructor is used by clone and sets wrapped novell URL
LDAPUrl(java.lang.String url)
          Constructs a URL object with the specified string as the URL.
LDAPUrl(java.lang.String host, int port, java.lang.String dn)
          Constructs a URL object with the specified host, port, and DN.
LDAPUrl(java.lang.String host, int port, java.lang.String dn, java.lang.String[] attrNames, int scope, java.lang.String filter, java.lang.String[] extensions)
          Constructs an LDAP URL with all fields explicitly assigned, to specify an LDAP search operation.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this URL object.
static java.lang.String decode(java.lang.String URLEncoded)
          Decodes a URL-encoded string.
static java.lang.String encode(java.lang.String toEncode)
          Encodes an arbitrary string using the URL encoding rules.
 java.lang.String[] getAttributeArray()
          Returns an array of attribute names specified in the URL.
 java.util.Enumeration getAttributes()
          Returns an enumerator for the attribute names specified in the URL.
 java.lang.String getDN()
          Returns the distinguished name encapsulated in the URL.
 java.lang.String[] getExtensions()
          Returns any LDAP URL extensions specified, or null if none are specified.
 java.lang.String getFilter()
          Returns the search filter or the default filter (objectclass=*) if none was specified.
 java.lang.String getHost()
          Returns the name of the LDAP server in the URL.
 int getPort()
          Returns the port number of the LDAP server in the URL.
 int getScope()
          Returns the depth of search.
(package private)  LDAPUrl getWrappedObject()
          Returns the com.novell.ldap.LDAPUrl object
 java.lang.String toString()
          Returns a valid string representation of this LDAP URL.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

url

private LDAPUrl url
Constructor Detail

LDAPUrl

public LDAPUrl(java.lang.String url)
        throws java.net.MalformedURLException
Constructs a URL object with the specified string as the URL.

Throws:
java.net.MalformedURLException
See Also:
com.novell.ldap.LDAPUrl.LDAPUrl(String)

LDAPUrl

public LDAPUrl(java.lang.String host,
               int port,
               java.lang.String dn)
Constructs a URL object with the specified host, port, and DN.

See Also:
com.novell.ldap.LDAPUrl.LDAPUrl(String, int, String)

LDAPUrl

public LDAPUrl(java.lang.String host,
               int port,
               java.lang.String dn,
               java.lang.String[] attrNames,
               int scope,
               java.lang.String filter,
               java.lang.String[] extensions)
Constructs an LDAP URL with all fields explicitly assigned, to specify an LDAP search operation.

See Also:
com.novell.ldap.LDAPUrl.LDAPUrl(String, int, String, String[], int, String, String[])

LDAPUrl

LDAPUrl(LDAPUrl novellURL)
This constructor is used by clone and sets wrapped novell URL

Method Detail

clone

public java.lang.Object clone()
Returns a clone of this URL object.

Overrides:
clone in class java.lang.Object
Returns:
clone of this URL object.
See Also:
com.novell.ldap.LDAPUrl.clone()

getWrappedObject

LDAPUrl getWrappedObject()
Returns the com.novell.ldap.LDAPUrl object


decode

public static java.lang.String decode(java.lang.String URLEncoded)
                               throws java.net.MalformedURLException
Decodes a URL-encoded string.

Throws:
java.net.MalformedURLException
See Also:
com.novell.ldap.LDAPUrl.decode(String)

encode

public static java.lang.String encode(java.lang.String toEncode)
Encodes an arbitrary string using the URL encoding rules.

See Also:
com.novell.ldap.LDAPUrl.encode(String)

getAttributeArray

public java.lang.String[] getAttributeArray()
Returns an array of attribute names specified in the URL.

See Also:
com.novell.ldap.LDAPUrl.getAttributeArray()

getAttributes

public java.util.Enumeration getAttributes()
Returns an enumerator for the attribute names specified in the URL.

See Also:
com.novell.ldap.LDAPUrl.getAttributes()

getDN

public java.lang.String getDN()
Returns the distinguished name encapsulated in the URL.

See Also:
com.novell.ldap.LDAPUrl.getDN()

getExtensions

public java.lang.String[] getExtensions()
Returns any LDAP URL extensions specified, or null if none are specified.

See Also:
com.novell.ldap.LDAPUrl.getExtensions()

getFilter

public java.lang.String getFilter()
Returns the search filter or the default filter (objectclass=*) if none was specified.

See Also:
com.novell.ldap.LDAPUrl.getFilter()

getHost

public java.lang.String getHost()
Returns the name of the LDAP server in the URL.

See Also:
com.novell.ldap.LDAPUrl.getHost()

getPort

public int getPort()
Returns the port number of the LDAP server in the URL.

See Also:
com.novell.ldap.LDAPUrl.getPort()

getScope

public int getScope()
Returns the depth of search.

See Also:
com.novell.ldap.LDAPUrl.getScope()

toString

public java.lang.String toString()
Returns a valid string representation of this LDAP URL.

Overrides:
toString in class java.lang.Object
See Also:
com.novell.ldap.LDAPUrl.toString()

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000