C# Class Novell.Directory.Ldap.LdapUrl

Encapsulates parameters of an Ldap URL query as defined in RFC2255. An LdapUrl object can be passed to LdapConnection.search to retrieve search results.
Inheritance: System.ICloneable
Exibir arquivo Open project: EventStore/csharp-ldap Class Usage Examples

Public Methods

Method Description
Clone ( ) : Object

Returns a clone of this URL object.

LdapUrl ( System url ) : System

Constructs a URL object with the specified string as the URL.

LdapUrl ( System host, int port, System dn ) : System

Constructs a URL object with the specified host, port, and DN. This form is used to create URL references to a particular object in the directory.

LdapUrl ( System host, int port, System dn, System attrNames, int scope, System filter, System extensions ) : System

Constructs an Ldap URL with all fields explicitly assigned, to specify an Ldap search operation.

LdapUrl ( System host, int port, System dn, System attrNames, int scope, System filter, System extensions, bool secure ) : System

Constructs an Ldap URL with all fields explicitly assigned, including isSecure, to specify an Ldap search operation.

ToString ( ) : System.String

Returns a valid string representation of this Ldap URL.

decode ( System URLEncoded ) : System.String

Decodes a URL-encoded string. Any occurences of %HH are decoded to the hex value represented. However, this method does NOT decode "+" into " ".

encode ( System toEncode ) : System.String

Encodes an arbitrary string using the URL encoding rules. Any illegal characters are encoded as %HH.

getDN ( ) : System.String

Returns the base distinguished name encapsulated in the URL.

Private Methods

Method Description
InitBlock ( ) : void
parseList ( System listStr, char delimiter, int listStart, int listEnd ) : System.String[]
parseURL ( System url ) : void
setDN ( System dn ) : void

Sets the base distinguished name encapsulated in the URL.

Method Details

Clone() public method

Returns a clone of this URL object.
public Clone ( ) : Object
return System.Object

LdapUrl() public method

Constructs a URL object with the specified string as the URL.
MalformedURLException The specified URL cannot be parsed. ///
public LdapUrl ( System url ) : System
url System An Ldap URL string, e.g. /// "ldap://ldap.example.com:80/dc=example,dc=com?cn, /// sn?sub?(objectclass=inetOrgPerson)". /// ///
return System

LdapUrl() public method

Constructs a URL object with the specified host, port, and DN. This form is used to create URL references to a particular object in the directory.
public LdapUrl ( System host, int port, System dn ) : System
host System Host identifier of Ldap server, or null for /// "localhost". /// ///
port int The port number for Ldap server (use /// LdapConnection.DEFAULT_PORT for default port). /// ///
dn System Distinguished name of the base object of the search. /// ///
return System

LdapUrl() public method

Constructs an Ldap URL with all fields explicitly assigned, to specify an Ldap search operation.
public LdapUrl ( System host, int port, System dn, System attrNames, int scope, System filter, System extensions ) : System
host System Host identifier of Ldap server, or null for /// "localhost". /// ///
port int The port number for Ldap server (use /// LdapConnection.DEFAULT_PORT for default port). /// ///
dn System Distinguished name of the base object of the search. /// /// ///
attrNames System Names or OIDs of attributes to retrieve. Passing a /// null array signifies that all user attributes are to be /// retrieved. Passing a value of "*" allows you to specify /// that all user attributes as well as any specified /// operational attributes are to be retrieved. /// /// ///
scope int Depth of search (in DN namespace). Use one of /// SCOPE_BASE, SCOPE_ONE, SCOPE_SUB from LdapConnection. /// /// ///
filter System The search filter specifying the search criteria. /// /// ///
extensions System Extensions provide a mechanism to extend the /// functionality of Ldap URLs. Currently no /// Ldap URL extensions are defined. Each extension /// specification is a type=value expression, and may /// be null or empty. The =value part may be /// omitted. The expression may be prefixed with '!' if it /// is mandatory for the evaluation of the URL. ///
return System

LdapUrl() public method

Constructs an Ldap URL with all fields explicitly assigned, including isSecure, to specify an Ldap search operation.
public LdapUrl ( System host, int port, System dn, System attrNames, int scope, System filter, System extensions, bool secure ) : System
host System Host identifier of Ldap server, or null for /// "localhost". /// /// ///
port int The port number for Ldap server (use /// LdapConnection.DEFAULT_PORT for default port). /// /// ///
dn System Distinguished name of the base object of the search. /// /// ///
attrNames System Names or OIDs of attributes to retrieve. Passing a /// null array signifies that all user attributes are to be /// retrieved. Passing a value of "*" allows you to specify /// that all user attributes as well as any specified /// operational attributes are to be retrieved. /// /// ///
scope int Depth of search (in DN namespace). Use one of /// SCOPE_BASE, SCOPE_ONE, SCOPE_SUB from LdapConnection. /// /// ///
filter System The search filter specifying the search criteria. /// from LdapConnection: SCOPE_BASE, SCOPE_ONE, SCOPE_SUB. /// /// ///
extensions System Extensions provide a mechanism to extend the /// functionality of Ldap URLs. Currently no /// Ldap URL extensions are defined. Each extension /// specification is a type=value expression, and may /// be null or empty. The =value part may be /// omitted. The expression may be prefixed with '!' if it /// is mandatory for the evaluation of the URL. /// /// ///
secure bool If true creates an Ldap URL of the ldaps type ///
return System

ToString() public method

Returns a valid string representation of this Ldap URL.
public ToString ( ) : System.String
return System.String

decode() public static method

Decodes a URL-encoded string. Any occurences of %HH are decoded to the hex value represented. However, this method does NOT decode "+" into " ".
MalformedURLException The URL could not be parsed. ///
public static decode ( System URLEncoded ) : System.String
URLEncoded System String to decode. /// ///
return System.String

encode() public static method

Encodes an arbitrary string using the URL encoding rules. Any illegal characters are encoded as %HH.
public static encode ( System toEncode ) : System.String
toEncode System The string to encode. /// ///
return System.String

getDN() public method

Returns the base distinguished name encapsulated in the URL.
public getDN ( ) : System.String
return System.String