|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.LDAPEntry
com.novell.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
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());
.
.
.
Other sample code:
LDAPSchemaElement
,
LDAPConnection.fetchSchema(java.lang.String)
,
LDAPConnection.getSchemaDN()
,
Serialized FormField Summary |
Fields inherited from class com.novell.ldap.LDAPEntry |
attrs, dn |
Constructor Summary | |
LDAPSchema()
This constructor was added to support default Serialization |
|
LDAPSchema(LDAPEntry ent)
Constructs an LDAPSchema object from attributes of an LDAPEntry. |
Method Summary | |
java.util.Enumeration |
getAttributeNames()
Returns an enumeration of attribute names. |
LDAPAttributeSchema |
getAttributeSchema(java.lang.String name)
Returns a particular attribute definition, or null if not found. |
java.util.Enumeration |
getAttributeSchemas()
Returns an enumeration of attribute definitions. |
java.util.Enumeration |
getDITContentRuleNames()
Returns an enumeration of DIT content rule names. |
LDAPDITContentRuleSchema |
getDITContentRuleSchema(java.lang.String name)
Returns a particular DIT content rule definition, or null if not found. |
java.util.Enumeration |
getDITContentRuleSchemas()
Returns an enumeration of DIT content rule definitions. |
java.util.Enumeration |
getDITStructureRuleNames()
Returns an enumeration of DIT structure rule names. |
LDAPDITStructureRuleSchema |
getDITStructureRuleSchema(int ID)
Returns a particular DIT structure rule definition, or null if not found. |
LDAPDITStructureRuleSchema |
getDITStructureRuleSchema(java.lang.String name)
Returns a particular DIT structure rule definition, or null if not found. |
java.util.Enumeration |
getDITStructureRuleSchemas()
Returns an enumeration of DIT structure rule definitions. |
java.util.Enumeration |
getMatchingRuleNames()
Returns an enumeration of matching rule names. |
LDAPMatchingRuleSchema |
getMatchingRuleSchema(java.lang.String name)
Returns a particular matching rule definition, or null if not found. |
java.util.Enumeration |
getMatchingRuleSchemas()
Returns an enumeration of matching rule definitions. |
java.util.Enumeration |
getMatchingRuleUseNames()
Returns an enumeration of matching rule use names. |
LDAPMatchingRuleUseSchema |
getMatchingRuleUseSchema(java.lang.String name)
Returns a particular matching rule use definition, or null if not found. |
java.util.Enumeration |
getMatchingRuleUseSchemas()
Returns an enumeration of matching rule use definitions. |
java.util.Enumeration |
getNameFormNames()
Returns an enumeration of name form names. |
LDAPNameFormSchema |
getNameFormSchema(java.lang.String name)
Returns a particular name form definition, or null if not found. |
java.util.Enumeration |
getNameFormSchemas()
Returns an enumeration of name form definitions. |
java.util.Enumeration |
getObjectClassNames()
Returns an enumeration of object class names. |
LDAPObjectClassSchema |
getObjectClassSchema(java.lang.String name)
Returns a particular object class definition, or null if not found. |
java.util.Enumeration |
getObjectClassSchemas()
Returns an enumeration of object class definitions. |
LDAPSyntaxSchema |
getSyntaxSchema(java.lang.String oid)
Returns a particular syntax definition, or null if not found. |
java.util.Enumeration |
getSyntaxSchemas()
Returns an enumeration of syntax definitions. |
static java.lang.Object |
readDSML(java.io.InputStream input)
This method is used to deserialize the DSML encoded representation of this class. |
Methods inherited from class com.novell.ldap.LDAPEntry |
compareTo, getAttribute, getAttributeSet, getAttributeSet, getDN, readExternal, toString, writeDSML, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LDAPSchema()
public LDAPSchema(LDAPEntry ent)
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"
ent
- An LDAPEntry containing schema information.Method Detail |
public LDAPAttributeSchema getAttributeSchema(java.lang.String name)
name
- Name or OID of the attribute for which a definition is
to be returned.
public LDAPDITContentRuleSchema getDITContentRuleSchema(java.lang.String name)
name
- The name of the DIT content rule use for which a
definition is to be returned.
public LDAPDITStructureRuleSchema getDITStructureRuleSchema(java.lang.String name)
name
- The name of the DIT structure rule use for which a
definition is to be returned.
public LDAPDITStructureRuleSchema getDITStructureRuleSchema(int ID)
ID
- The ID of the DIT structure rule use for which a
definition is to be returned.
public LDAPMatchingRuleSchema getMatchingRuleSchema(java.lang.String name)
name
- The name of the matching rule for which a definition
is to be returned.
public LDAPMatchingRuleUseSchema getMatchingRuleUseSchema(java.lang.String name)
name
- The name of the matching rule use for which a definition
is to be returned.
public LDAPNameFormSchema getNameFormSchema(java.lang.String name)
name
- The name of the name form for which a definition
is to be returned.
public LDAPObjectClassSchema getObjectClassSchema(java.lang.String name)
name
- The name or OID of the object class for which a
definition is to be returned.
public LDAPSyntaxSchema getSyntaxSchema(java.lang.String oid)
oid
- The oid of the syntax for which a definition
is to be returned.
public java.util.Enumeration getAttributeSchemas()
public java.util.Enumeration getDITContentRuleSchemas()
public java.util.Enumeration getDITStructureRuleSchemas()
public java.util.Enumeration getMatchingRuleSchemas()
public java.util.Enumeration getMatchingRuleUseSchemas()
public java.util.Enumeration getNameFormSchemas()
public java.util.Enumeration getObjectClassSchemas()
public java.util.Enumeration getSyntaxSchemas()
public java.util.Enumeration getAttributeNames()
public java.util.Enumeration getDITContentRuleNames()
public java.util.Enumeration getDITStructureRuleNames()
public java.util.Enumeration getMatchingRuleNames()
public java.util.Enumeration getMatchingRuleUseNames()
public java.util.Enumeration getNameFormNames()
public java.util.Enumeration getObjectClassNames()
public static java.lang.Object readDSML(java.io.InputStream input) throws java.io.IOException
input
- InputStream for the DSML formatted data.
java.io.IOException
- when serialization fails.
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |