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
Afficher le fichier Open project: EventStore/csharp-ldap Class Usage Examples

Private Properties

Свойство Type Description
LdapAttribute System
add void
addValue void
equals bool
removeValue void

Méthodes publiques

Méthode 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

Méthode 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 méthode

Returns a clone of this LdapAttribute.
public Clone ( ) : Object
Résultat System.Object

CompareTo() public méthode

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. /// ///
Résultat int

LdapAttribute() public méthode

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 ///
Résultat System

LdapAttribute() public méthode

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

LdapAttribute() public méthode

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 ///
Résultat System

ToString() public méthode

Returns a string representation of this LdapAttribute
public ToString ( ) : System.String
Résultat System.String

addBase64Value() public méthode

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 ///
Résultat void

addBase64Value() public méthode

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 ///
Résultat void

addBase64Value() public méthode

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 ///
Résultat void

addURLValue() public méthode

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 ///
Résultat void

addValue() public méthode

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 ///
Résultat void

getBaseName() public méthode

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
Résultat System.String

getBaseName() public static méthode

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. /// ///
Résultat System.String

getSubtypes() public méthode

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[]
Résultat System.String[]

getSubtypes() public static méthode

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. /// ///
Résultat System.String[]

hasSubtype() public méthode

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. /// ///
Résultat bool

hasSubtypes() public méthode

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. /// ///
Résultat bool

removeValue() public méthode

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 ///
Résultat void

size() public méthode

Returns the number of values in the attribute.
public size ( ) : int
Résultat int