C# Класс Novell.Directory.Ldap.LdapSchema

Represents a schema entry that controls one or more entries held by a Directory Server. LdapSchema Contains methods to parse schema attributes into individual schema definitions, represented by subclasses of {@link LdapSchemaElement}. Schema may be retrieved from a Directory server with the fetchSchema method of LdapConnection or by creating an LdapEntry containing schema attributes. The following sample code demonstrates how to retrieve schema elements from LdapSchema
 . . . LdapSchema schema; LdapSchemaElement element; // connect to the server lc.connect( ldapHost, ldapPort ); lc.bind( ldapVersion, loginDN, password ); // read the schema from the directory schema = lc.fetchSchema( lc.getSchemaDN() ); // retrieve the definition of common name element = schema.getAttributeSchema( "cn" ); System.out.println("The attribute cn has an oid of " + element.getID()); . . . 
Наследование: LdapEntry
Показать файл Открыть проект

Открытые методы

Метод Описание
LdapSchema ( LdapEntry ent ) : System

Constructs an LdapSchema object from attributes of an LdapEntry. The object is empty if the entry parameter contains no schema attributes. The recognized schema attributes are the following:

 "attributeTypes", "objectClasses", "ldapSyntaxes", "nameForms", "dITContentRules", "dITStructureRules", "matchingRules","matchingRuleUse" 

getAttributeSchema ( System name ) : LdapAttributeSchema

Returns a particular attribute definition, or null if not found.

getDITContentRuleSchema ( System name ) : LdapDITContentRuleSchema

Returns a particular DIT content rule definition, or null if not found.

getDITStructureRuleSchema ( System name ) : LdapDITStructureRuleSchema

Returns a particular DIT structure rule definition, or null if not found.

getDITStructureRuleSchema ( int ID ) : LdapDITStructureRuleSchema

Returns a particular DIT structure rule definition, or null if not found.

getMatchingRuleSchema ( System name ) : LdapMatchingRuleSchema

Returns a particular matching rule definition, or null if not found.

getMatchingRuleUseSchema ( System name ) : LdapMatchingRuleUseSchema

Returns a particular matching rule use definition, or null if not found.

getNameFormSchema ( System name ) : LdapNameFormSchema

Returns a particular name form definition, or null if not found.

getObjectClassSchema ( System name ) : LdapObjectClassSchema

Returns a particular object class definition, or null if not found.

getSyntaxSchema ( System oid ) : LdapSyntaxSchema

Returns a particular syntax definition, or null if not found.

Приватные методы

Метод Описание
InitBlock ( ) : void
addElement ( int schemaType, LdapSchemaElement element ) : void

Adds the schema definition to the idList and nameList HashMaps. This method is used by the methods fetchSchema and add. Note that the nameTable has all keys cast to Upper-case. This is so we can have a case-insensitive HashMap. The getXXX (String key) methods will also cast to uppercase.

getSchemaElement ( int schemaType, System key ) : LdapSchemaElement

This function abstracts retrieving LdapSchemaElements from the local copy of schema in this LdapSchema class. This is used by getXXX(String name) functions. Note that the nameTable has all keys cast to Upper-case. This is so we can have a case-insensitive HashMap. The getXXX (String key) methods will also cast to uppercase. The first character of a NAME string can only be an alpha character (see section 4.1 of rfc2252) Thus if the first character is a digit we can conclude it is an OID. Note that this digit is ASCII only.

getType ( LdapSchemaElement element ) : int

This helper function returns a number that represents the type of schema definition the element represents. The top of this file enumerates these types.

Описание методов

LdapSchema() публичный Метод

Constructs an LdapSchema object from attributes of an LdapEntry. The object is empty if the entry parameter contains no schema attributes. The recognized schema attributes are the following:
 "attributeTypes", "objectClasses", "ldapSyntaxes", "nameForms", "dITContentRules", "dITStructureRules", "matchingRules","matchingRuleUse" 
public LdapSchema ( LdapEntry ent ) : System
ent LdapEntry An LdapEntry containing schema information. ///
Результат System

getAttributeSchema() публичный Метод

Returns a particular attribute definition, or null if not found.
public getAttributeSchema ( System name ) : LdapAttributeSchema
name System Name or OID of the attribute for which a definition is /// to be returned. /// ///
Результат LdapAttributeSchema

getDITContentRuleSchema() публичный Метод

Returns a particular DIT content rule definition, or null if not found.
public getDITContentRuleSchema ( System name ) : LdapDITContentRuleSchema
name System The name of the DIT content rule use for which a /// definition is to be returned. /// ///
Результат LdapDITContentRuleSchema

getDITStructureRuleSchema() публичный Метод

Returns a particular DIT structure rule definition, or null if not found.
public getDITStructureRuleSchema ( System name ) : LdapDITStructureRuleSchema
name System The name of the DIT structure rule use for which a /// definition is to be returned. /// ///
Результат LdapDITStructureRuleSchema

getDITStructureRuleSchema() публичный Метод

Returns a particular DIT structure rule definition, or null if not found.
public getDITStructureRuleSchema ( int ID ) : LdapDITStructureRuleSchema
ID int The ID of the DIT structure rule use for which a /// definition is to be returned. /// ///
Результат LdapDITStructureRuleSchema

getMatchingRuleSchema() публичный Метод

Returns a particular matching rule definition, or null if not found.
public getMatchingRuleSchema ( System name ) : LdapMatchingRuleSchema
name System The name of the matching rule for which a definition /// is to be returned. /// ///
Результат LdapMatchingRuleSchema

getMatchingRuleUseSchema() публичный Метод

Returns a particular matching rule use definition, or null if not found.
public getMatchingRuleUseSchema ( System name ) : LdapMatchingRuleUseSchema
name System The name of the matching rule use for which a definition /// is to be returned. /// ///
Результат LdapMatchingRuleUseSchema

getNameFormSchema() публичный Метод

Returns a particular name form definition, or null if not found.
public getNameFormSchema ( System name ) : LdapNameFormSchema
name System The name of the name form for which a definition /// is to be returned. /// ///
Результат LdapNameFormSchema

getObjectClassSchema() публичный Метод

Returns a particular object class definition, or null if not found.
public getObjectClassSchema ( System name ) : LdapObjectClassSchema
name System The name or OID of the object class for which a /// definition is to be returned. /// ///
Результат LdapObjectClassSchema

getSyntaxSchema() публичный Метод

Returns a particular syntax definition, or null if not found.
public getSyntaxSchema ( System oid ) : LdapSyntaxSchema
oid System The oid of the syntax for which a definition /// is to be returned. /// ///
Результат LdapSyntaxSchema