Package netscape.ldap

Class LDAPUrl

java.lang.Object
netscape.ldap.LDAPUrl
All Implemented Interfaces:
Serializable

public class LDAPUrl extends Object implements Serializable
Represents an LDAP URL. The complete specification for LDAP URLs is in RFC 1959. In addition, the secure ldap (ldaps://) is also supported. LDAP URLs have the following format:
 "ldap[s]://" [ hostName [":" portNumber] ] "/"
                      distinguishedName
          ["?" attributeList ["?" scope
                      "?" filterString ] ]
 
where

  • all text within double-quotes are literal

  • hostName and portNumber identify the location of the LDAP server.

  • distinguishedName is the name of an entry within the given directory (the entry represents the starting point of the search)

  • attributeList contains a list of attributes to retrieve (if null, fetch all attributes). This is a comma-delimited list of attribute names.

  • scope is one of the following:
    • base indicates that this is a search only for the specified entry
    • one indicates that this is a search for matching entries one level under the specified entry (and not including the entry itself)
    • sub indicates that this is a search for matching entries at all levels under the specified entry (including the entry itself)

    If not specified, scope is base by default.

  • filterString is a human-readable representation of the search criteria. This value is used only for one-level or subtree searches.

Note that if scope and filterString are not specified, an LDAP URL identifies exactly one entry in the directory.

The same encoding rules for other URLs (e.g. HTTP) apply for LDAP URLs. Specifically, any "illegal" characters are escaped with %HH, where HH represent the two hex digits which correspond to the ASCII value of the character. This encoding is only legal (or necessary) on the DN and filter portions of the URL.

Version:
1.0
See Also: