C# 클래스 Novell.Directory.Ldap.LdapAttributeSet

A set of {@link LdapAttribute} objects. An LdapAttributeSet is a collection of LdapAttribute classes as returned from an LdapEntry on a search or read operation. LdapAttributeSet may be also used to contruct an entry to be added to a directory. If the add() or addAll() methods are called and one or more of the objects to be added is not an LdapAttribute, ClassCastException is thrown (as discussed in the documentation for java.util.Collection).
상속: SupportClass.AbstractSetSupport, System.ICloneable
파일 보기 프로젝트 열기: EventStore/csharp-ldap 1 사용 예제들

공개 메소드들

메소드 설명
Add ( object attr ) : bool

Adds the specified attribute to this set if it is not already present. If an attribute with the same name already exists in the set then the specified attribute will not be added.

AddAll ( System c ) : bool

Adds all LdapAttribute objects in the specified collection to this collection.

Clear ( ) : void

Removes all of the elements from this set.

Clone ( ) : Object

Returns a deep copy of this attribute set.

Contains ( object attr ) : bool

Returns true if this set contains an attribute of the same name as the specified attribute.

GetEnumerator ( ) : System.Collections.IEnumerator

Returns an iterator over the attributes in this set. The attributes returned from this iterator are not in any particular order.

IsEmpty ( ) : bool

Returns true if this set contains no elements

LdapAttributeSet ( ) : System

Constructs an empty set of attributes.

Remove ( object object_Renamed ) : bool

Removes the specified object from this set if it is present. If the specified object is of type LdapAttribute, the specified attribute will be removed. If the specified object is of type String, the attribute with a name that matches the string will be removed.

ToString ( ) : System.String

Returns a string representation of this LdapAttributeSet

getAttribute ( System attrName ) : LdapAttribute

Returns the attribute matching the specified attrName. For example:

  • getAttribute("cn") returns only the "cn" attribute
  • getAttribute("cn;lang-en") returns only the "cn;lang-en" attribute.
In both cases, null is returned if there is no exact match to the specified attrName. Note: Novell eDirectory does not currently support language subtypes. It does support the "binary" subtype.

getAttribute ( System attrName, System lang ) : LdapAttribute

Returns a single best-match attribute, or null if no match is available in the entry. Ldap version 3 allows adding a subtype specification to an attribute name. For example, "cn;lang-ja" indicates a Japanese language subtype of the "cn" attribute and "cn;lang-ja-JP-kanji" may be a subtype of "cn;lang-ja". This feature may be used to provide multiple localizations in the same directory. For attributes which do not vary among localizations, only the base attribute may be stored, whereas for others there may be varying degrees of specialization. For example, getAttribute(attrName,lang) returns the LdapAttribute that exactly matches attrName and that best matches lang. If there are subtypes other than "lang" subtypes included in attrName, for example, "cn;binary", only attributes with all of those subtypes are returned. If lang is null or empty, the method behaves as getAttribute(attrName). If there are no matching attributes, null is returned. Assume the entry contains only the following attributes:

  • cn;lang-en
  • cn;lang-ja-JP-kanji
  • sn
Examples:
  • getAttribute( "cn" ) returns null.
  • getAttribute( "sn" ) returns the "sn" attribute.
  • getAttribute( "cn", "lang-en-us" ) returns the "cn;lang-en" attribute.
  • getAttribute( "cn", "lang-en" ) returns the "cn;lang-en" attribute.
  • getAttribute( "cn", "lang-ja" ) returns null.
  • getAttribute( "sn", "lang-en" ) returns the "sn" attribute.
Note: Novell eDirectory does not currently support language subtypes. It does support the "binary" subtype.

getSubset ( System subtype ) : LdapAttributeSet

Creates a new attribute set containing only the attributes that have the specified subtypes. For example, suppose an attribute set contains the following attributes:

  • cn
  • cn;lang-ja
  • sn;phonetic;lang-ja
  • sn;lang-us
Calling the getSubset method and passing lang-ja as the argument, the method returns an attribute set containing the following attributes:
  • cn;lang-ja
  • sn;phonetic;lang-ja

메소드 상세

Add() 공개 메소드

Adds the specified attribute to this set if it is not already present. If an attribute with the same name already exists in the set then the specified attribute will not be added.
public Add ( object attr ) : bool
attr object Object of type LdapAttribute /// ///
리턴 bool

AddAll() 공개 메소드

Adds all LdapAttribute objects in the specified collection to this collection.
public AddAll ( System c ) : bool
c System Collection of LdapAttribute objects. /// /// @throws ClassCastException occurs when an element in the /// collection is not of type LdapAttribute. /// ///
리턴 bool

Clear() 공개 메소드

Removes all of the elements from this set.
public Clear ( ) : void
리턴 void

Clone() 공개 메소드

Returns a deep copy of this attribute set.
public Clone ( ) : Object
리턴 System.Object

Contains() 공개 메소드

Returns true if this set contains an attribute of the same name as the specified attribute.
public Contains ( object attr ) : bool
attr object Object of type LdapAttribute /// ///
리턴 bool

GetEnumerator() 공개 메소드

Returns an iterator over the attributes in this set. The attributes returned from this iterator are not in any particular order.
public GetEnumerator ( ) : System.Collections.IEnumerator
리턴 System.Collections.IEnumerator

IsEmpty() 공개 메소드

Returns true if this set contains no elements
public IsEmpty ( ) : bool
리턴 bool

LdapAttributeSet() 공개 메소드

Constructs an empty set of attributes.
public LdapAttributeSet ( ) : System
리턴 System

Remove() 공개 메소드

Removes the specified object from this set if it is present. If the specified object is of type LdapAttribute, the specified attribute will be removed. If the specified object is of type String, the attribute with a name that matches the string will be removed.
public Remove ( object object_Renamed ) : bool
object_Renamed object
리턴 bool

ToString() 공개 메소드

Returns a string representation of this LdapAttributeSet
public ToString ( ) : System.String
리턴 System.String

getAttribute() 공개 메소드

Returns the attribute matching the specified attrName. For example:
  • getAttribute("cn") returns only the "cn" attribute
  • getAttribute("cn;lang-en") returns only the "cn;lang-en" attribute.
In both cases, null is returned if there is no exact match to the specified attrName. Note: Novell eDirectory does not currently support language subtypes. It does support the "binary" subtype.
public getAttribute ( System attrName ) : LdapAttribute
attrName System The name of an attribute to retrieve, with or without /// subtype specifications. For example, "cn", "cn;phonetic", and /// "cn;binary" are valid attribute names. /// ///
리턴 LdapAttribute

getAttribute() 공개 메소드

Returns a single best-match attribute, or null if no match is available in the entry. Ldap version 3 allows adding a subtype specification to an attribute name. For example, "cn;lang-ja" indicates a Japanese language subtype of the "cn" attribute and "cn;lang-ja-JP-kanji" may be a subtype of "cn;lang-ja". This feature may be used to provide multiple localizations in the same directory. For attributes which do not vary among localizations, only the base attribute may be stored, whereas for others there may be varying degrees of specialization. For example, getAttribute(attrName,lang) returns the LdapAttribute that exactly matches attrName and that best matches lang. If there are subtypes other than "lang" subtypes included in attrName, for example, "cn;binary", only attributes with all of those subtypes are returned. If lang is null or empty, the method behaves as getAttribute(attrName). If there are no matching attributes, null is returned. Assume the entry contains only the following attributes:
  • cn;lang-en
  • cn;lang-ja-JP-kanji
  • sn
Examples:
  • getAttribute( "cn" ) returns null.
  • getAttribute( "sn" ) returns the "sn" attribute.
  • getAttribute( "cn", "lang-en-us" ) returns the "cn;lang-en" attribute.
  • getAttribute( "cn", "lang-en" ) returns the "cn;lang-en" attribute.
  • getAttribute( "cn", "lang-ja" ) returns null.
  • getAttribute( "sn", "lang-en" ) returns the "sn" attribute.
Note: Novell eDirectory does not currently support language subtypes. It does support the "binary" subtype.
public getAttribute ( System attrName, System lang ) : LdapAttribute
attrName System The name of an attribute to retrieve, with or without /// subtype specifications. For example, "cn", "cn;phonetic", and /// cn;binary" are valid attribute names. /// ///
lang System A language specification with optional subtypes /// appended using "-" as separator. For example, "lang-en", "lang-en-us", /// "lang-ja", and "lang-ja-JP-kanji" are valid language specification. /// ///
리턴 LdapAttribute

getSubset() 공개 메소드

Creates a new attribute set containing only the attributes that have the specified subtypes. For example, suppose an attribute set contains the following attributes:
  • cn
  • cn;lang-ja
  • sn;phonetic;lang-ja
  • sn;lang-us
Calling the getSubset method and passing lang-ja as the argument, the method returns an attribute set containing the following attributes:
  • cn;lang-ja
  • sn;phonetic;lang-ja
public getSubset ( System subtype ) : LdapAttributeSet
subtype System Semi-colon delimited list of subtypes to include. For /// example: ///
    ///
  • "lang-ja" specifies only Japanese language subtypes
  • ///
  • "binary" specifies only binary subtypes
  • ///
  • "binary;lang-ja" specifies only Japanese language subtypes /// which also are binary
  • ///
/// /// Note: Novell eDirectory does not currently support language subtypes. /// It does support the "binary" subtype. /// ///
리턴 LdapAttributeSet