C# Class Novell.Directory.Ldap.LdapAttribute

The name and values of one attribute of a directory entry. LdapAttribute objects are used when searching for, adding, modifying, and deleting attributes from the directory. LdapAttributes are often used in conjunction with an {@link LdapAttributeSet} when retrieving or adding multiple attributes to an entry.
Inheritance: System.ICloneable, System.IComparable
Mostra file Open project: EventStore/csharp-ldap Class Usage Examples

Private Properties

Property Type Description
LdapAttribute System
add void
addValue void
equals bool
removeValue void

Public Methods

Method Description
Clone ( ) : Object

Returns a clone of this LdapAttribute.

CompareTo ( System attribute ) : int

Compares this object with the specified object for order. Ordering is determined by comparing attribute names (see {@link #getName() }) using the method compareTo() of the String class.

LdapAttribute ( LdapAttribute attr ) : System

Constructs an attribute with copies of all values of the input attribute.

LdapAttribute ( System attrName ) : System

Constructs an attribute with no values.

LdapAttribute ( System attrName, System attrString ) : System

Constructs an attribute with a single string value.

ToString ( ) : System.String

Returns a string representation of this LdapAttribute

addBase64Value ( System attrString ) : void

Adds a base64 encoded value to the attribute. The value will be decoded and stored as bytes. String data encoded as a base64 value must be UTF-8 characters.

addBase64Value ( System attrString, int start, int end ) : void

Adds a base64 encoded value to the attribute. The value will be decoded and stored as bytes. Character data encoded as a base64 value must be UTF-8 characters.

addBase64Value ( char attrChars ) : void

Adds a base64 encoded value to the attribute. The value will be decoded and stored as bytes. Character data encoded as a base64 value must be UTF-8 characters.

addURLValue ( System url ) : void

Adds a URL, indicating a file or other resource that contains the value of the attribute.

addValue ( System attrString ) : void

Adds a string value to the attribute.

getBaseName ( ) : System.String

Returns the base name of the attribute. For example, if the attribute name is cn;lang-ja;phonetic, this method returns cn.

getBaseName ( System attrName ) : System.String

Returns the base name of the specified attribute name. For example, if the attribute name is cn;lang-ja;phonetic, this method returns cn.

getSubtypes ( ) : System.String[]

Extracts the subtypes from the attribute name. For example, if the attribute name is cn;lang-ja;phonetic, this method returns an array containing lang-ja and phonetic.

getSubtypes ( System attrName ) : System.String[]

Extracts the subtypes from the specified attribute name. For example, if the attribute name is cn;lang-ja;phonetic, this method returns an array containing lang-ja and phonetic.

hasSubtype ( System subtype ) : bool

Reports if the attribute name contains the specified subtype. For example, if you check for the subtype lang-en and the attribute name is cn;lang-en, this method returns true.

hasSubtypes ( System subtypes ) : bool

Reports if the attribute name contains all the specified subtypes. For example, if you check for the subtypes lang-en and phonetic and if the attribute name is cn;lang-en;phonetic, this method returns true. If the attribute name is cn;phonetic or cn;lang-en, this method returns false.

removeValue ( System attrString ) : void

Removes a string value from the attribute.

size ( ) : int

Returns the number of values in the attribute.

Private Methods

Method Description
LdapAttribute ( System attrName, sbyte attrBytes ) : System
add ( sbyte bytes ) : void

Adds an object to this object's list of attribute values

addValue ( sbyte attrBytes ) : void
equals ( sbyte e1, sbyte e2 ) : bool

Returns true if the two specified arrays of bytes are equal to each another. Matches the logic of Arrays.equals which is not available in jdk 1.1.x.

removeValue ( sbyte attrBytes ) : void

Method Details

Clone() public method

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

CompareTo() public method

Compares this object with the specified object for order. Ordering is determined by comparing attribute names (see {@link #getName() }) using the method compareTo() of the String class.
public CompareTo ( System attribute ) : int
attribute System The LdapAttribute to be compared to this object. /// ///
return int

LdapAttribute() public method

Constructs an attribute with copies of all values of the input attribute.
public LdapAttribute ( LdapAttribute attr ) : System
attr LdapAttribute An LdapAttribute to use as a template. /// /// @throws IllegalArgumentException if attr is null ///
return System

LdapAttribute() public method

Constructs an attribute with no values.
public LdapAttribute ( System attrName ) : System
attrName System Name of the attribute. /// /// @throws IllegalArgumentException if attrName is null ///
return System

LdapAttribute() public method

Constructs an attribute with a single string value.
public LdapAttribute ( System attrName, System attrString ) : System
attrName System Name of the attribute. ///
attrString System Value of the attribute as a string. /// /// @throws IllegalArgumentException if attrName or attrString is null ///
return System

ToString() public method

Returns a string representation of this LdapAttribute
public ToString ( ) : System.String
return System.String

addBase64Value() public method

Adds a base64 encoded value to the attribute. The value will be decoded and stored as bytes. String data encoded as a base64 value must be UTF-8 characters.
public addBase64Value ( System attrString ) : void
attrString System The base64 value of the attribute as a String. /// /// @throws IllegalArgumentException if attrString is null ///
return void

addBase64Value() public method

Adds a base64 encoded value to the attribute. The value will be decoded and stored as bytes. Character data encoded as a base64 value must be UTF-8 characters.
public addBase64Value ( System attrString, int start, int end ) : void
attrString System The base64 value of the attribute as a StringBuffer. ///
start int The start index of base64 encoded part, inclusive. ///
end int The end index of base encoded part, exclusive. /// /// @throws IllegalArgumentException if attrString is null ///
return void

addBase64Value() public method

Adds a base64 encoded value to the attribute. The value will be decoded and stored as bytes. Character data encoded as a base64 value must be UTF-8 characters.
public addBase64Value ( char attrChars ) : void
attrChars char The base64 value of the attribute as an array of /// characters. /// /// @throws IllegalArgumentException if attrString is null ///
return void

addURLValue() public method

Adds a URL, indicating a file or other resource that contains the value of the attribute.
public addURLValue ( System url ) : void
url System String value of a URL pointing to the resource containing /// the value of the attribute. /// /// @throws IllegalArgumentException if url is null ///
return void

addValue() public method

Adds a string value to the attribute.
public addValue ( System attrString ) : void
attrString System Value of the attribute as a String. /// /// @throws IllegalArgumentException if attrString is null ///
return void

getBaseName() public method

Returns the base name of the attribute. For example, if the attribute name is cn;lang-ja;phonetic, this method returns cn.
public getBaseName ( ) : System.String
return System.String

getBaseName() public static method

Returns the base name of the specified attribute name. For example, if the attribute name is cn;lang-ja;phonetic, this method returns cn.
public static getBaseName ( System attrName ) : System.String
attrName System Name of the attribute from which to extract the /// base name. /// ///
return System.String

getSubtypes() public method

Extracts the subtypes from the attribute name. For example, if the attribute name is cn;lang-ja;phonetic, this method returns an array containing lang-ja and phonetic.
public getSubtypes ( ) : System.String[]
return System.String[]

getSubtypes() public static method

Extracts the subtypes from the specified attribute name. For example, if the attribute name is cn;lang-ja;phonetic, this method returns an array containing lang-ja and phonetic.
public static getSubtypes ( System attrName ) : System.String[]
attrName System Name of the attribute from which to extract /// the subtypes. /// ///
return System.String[]

hasSubtype() public method

Reports if the attribute name contains the specified subtype. For example, if you check for the subtype lang-en and the attribute name is cn;lang-en, this method returns true.
public hasSubtype ( System subtype ) : bool
subtype System The single subtype to check for. /// ///
return bool

hasSubtypes() public method

Reports if the attribute name contains all the specified subtypes. For example, if you check for the subtypes lang-en and phonetic and if the attribute name is cn;lang-en;phonetic, this method returns true. If the attribute name is cn;phonetic or cn;lang-en, this method returns false.
public hasSubtypes ( System subtypes ) : bool
subtypes System An array of subtypes to check for. /// ///
return bool

removeValue() public method

Removes a string value from the attribute.
public removeValue ( System attrString ) : void
attrString System Value of the attribute as a string. /// /// Note: Removing a value which is not present in the attribute has /// no effect. /// /// @throws IllegalArgumentException if attrString is null ///
return void

size() public method

Returns the number of values in the attribute.
public size ( ) : int
return int