All LDAP Classes
Internal LDAP Classes

com.novell.ldap
Class LDAPNameFormSchema

java.lang.Object
  extended by com.novell.ldap.LDAPAttribute
      extended by com.novell.ldap.LDAPSchemaElement
          extended by com.novell.ldap.LDAPNameFormSchema
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class LDAPNameFormSchema
extends LDAPSchemaElement

A specific a name form in the directory schema.

The LDAPNameFormSchema class represents the definition of a Name Form. It is used to discover or modify the allowed naming attributes for a particular object class.

See Also:
LDAPSchemaElement, LDAPSchema, Serialized Form

Field Summary
private  java.lang.String objectClass
           
private  java.lang.String[] optional
           
private  java.lang.String[] required
           
 
Fields inherited from class com.novell.ldap.LDAPSchemaElement
description, hashQualifier, names, obsolete, oid, qualifier
 
Constructor Summary
LDAPNameFormSchema()
          This constructor was added to support default Serialization
LDAPNameFormSchema(java.lang.String raw)
           
LDAPNameFormSchema(java.lang.String[] names, java.lang.String oid, java.lang.String description, boolean obsolete, java.lang.String objectClass, java.lang.String[] required, java.lang.String[] optional)
          Constructs a name form for adding to or deleting from the schema.
 
Method Summary
protected  java.lang.String formatString()
          Returns a string in a format suitable for directly adding to a directory, as a value of the particular schema element class.
 java.lang.String getObjectClass()
          Returns the name of the object class which this name form applies to.
 java.lang.String[] getOptionalNamingAttributes()
          Returns the list of optional naming attributes for an entry controlled by this content rule.
 java.lang.String[] getRequiredNamingAttributes()
          Returns the list of required naming attributes for an entry controlled by this name form.
private static LDAPXMLHandler getTopXMLHandler(java.lang.String tagname, LDAPXMLHandler parenthandler)
           
(package private) static LDAPXMLHandler getXMLHandler(java.lang.String tagname, LDAPXMLHandler parenthandler)
          This method return the LDAPHandler which handles the XML (DSML) tags for this class
static java.lang.Object readDSML(java.io.InputStream input)
          This method is used to deserialize the DSML encoded representation of this class.
protected  void setDeserializedValues(java.io.BufferedInputStream istream)
           
protected  void writeValue(java.lang.StringBuffer buff)
           
protected  void writeValue(java.io.Writer out)
           
 
Methods inherited from class com.novell.ldap.LDAPSchemaElement
addValue, addValue, getDescription, getID, getNames, getQualifier, getQualifierNames, isObsolete, removeValue, removeValue, setQualifier, toString
 
Methods inherited from class com.novell.ldap.LDAPAttribute
addBase64Value, addBase64Value, addBase64Value, addURLValue, addURLValue, addValue, clone, compareTo, getBaseName, getBaseName, getByteValue, getByteValueArray, getByteValues, getLangSubtype, getName, getStringValue, getStringValueArray, getStringValues, getSubtypes, getSubtypes, hasSubtype, hasSubtypes, newLine, readExternal, removeValue, setValue, size, writeDSML, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

objectClass

private java.lang.String objectClass

required

private java.lang.String[] required

optional

private java.lang.String[] optional
Constructor Detail

LDAPNameFormSchema

public LDAPNameFormSchema()
This constructor was added to support default Serialization


LDAPNameFormSchema

public LDAPNameFormSchema(java.lang.String[] names,
                          java.lang.String oid,
                          java.lang.String description,
                          boolean obsolete,
                          java.lang.String objectClass,
                          java.lang.String[] required,
                          java.lang.String[] optional)
Constructs a name form for adding to or deleting from the schema.

Parameters:
names - The name(s) of the name form.

oid - The unique object identifier of the name form - in dotted numerical format.

description - An optional description of the name form.

obsolete - True if the name form is obsolete.

objectClass - The object to which this name form applies. This may be specified by either name or numeric oid.

required - A list of the attributes that must be present in the RDN of an entry that this name form controls. These attributes may be specified by either name or numeric oid.

optional - A list of the attributes that may be present in the RDN of an entry that this name form controls. These attributes may be specified by either name or numeric oid.


LDAPNameFormSchema

public LDAPNameFormSchema(java.lang.String raw)
Method Detail

getObjectClass

public java.lang.String getObjectClass()
Returns the name of the object class which this name form applies to.

Returns:
The name of the object class.

getRequiredNamingAttributes

public java.lang.String[] getRequiredNamingAttributes()
Returns the list of required naming attributes for an entry controlled by this name form.

Returns:
The list of required naming attributes.

getOptionalNamingAttributes

public java.lang.String[] getOptionalNamingAttributes()
Returns the list of optional naming attributes for an entry controlled by this content rule.

Returns:
The list of the optional naming attributes.

formatString

protected java.lang.String formatString()
Returns a string in a format suitable for directly adding to a directory, as a value of the particular schema element class.

Specified by:
formatString in class LDAPSchemaElement
Returns:
A string representation of the class' definition.

setDeserializedValues

protected void setDeserializedValues(java.io.BufferedInputStream istream)
                              throws java.io.IOException
Overrides:
setDeserializedValues in class LDAPAttribute
Throws:
java.io.IOException

writeValue

protected void writeValue(java.io.Writer out)
                   throws java.io.IOException
Overrides:
writeValue in class LDAPAttribute
Throws:
java.io.IOException

writeValue

protected void writeValue(java.lang.StringBuffer buff)
Overrides:
writeValue in class LDAPAttribute

readDSML

public static java.lang.Object readDSML(java.io.InputStream input)
                                 throws java.io.IOException
This method is used to deserialize the DSML encoded representation of this class.

Parameters:
input - InputStream for the DSML formatted data.
Returns:
Deserialized form of this class.
Throws:
java.io.IOException - when serialization fails.

getTopXMLHandler

private static LDAPXMLHandler getTopXMLHandler(java.lang.String tagname,
                                               LDAPXMLHandler parenthandler)

getXMLHandler

static LDAPXMLHandler getXMLHandler(java.lang.String tagname,
                                    LDAPXMLHandler parenthandler)
This method return the LDAPHandler which handles the XML (DSML) tags for this class

Parameters:
tagname - Name of the Root tag used to represent this class.
parenthandler - Parent LDAPXMLHandler for this tag.
Returns:
LDAPXMLHandler to handle this element.

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000