com.novell.admin.ns
Class Syntax

java.lang.Object
  extended bycom.novell.admin.ns.Syntax
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LDAPSyntax, NDSSyntax

public abstract class Syntax
extends java.lang.Object
implements java.io.Serializable

Abstract class from which all concrete syntaxes must extend.

The pattern intended for this class is a modified "Prototype" pattern. The constructor is protected, but there is no cloning ability.

See Also:
Serialized Form

Constructor Summary
protected Syntax(java.lang.String name, Strategy stgy, int id)
          Prototype constructor.
 
Method Summary
 ValueComponent createValueComponent()
          Creates a ValueList object.
 ValueComponent createValueComponent(java.lang.Object initData)
          Creates a ValueComponent for a particular syntax.
 int getId()
          Returns the ID of the syntax.
 java.lang.String getName()
          Returns the name of the syntax.
 Strategy getStrategy()
          Returns the strategy associated with this syntax.
 java.lang.String toString()
          Returns the string representation of this syntax.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Syntax

protected Syntax(java.lang.String name,
                 Strategy stgy,
                 int id)
Prototype constructor.

Derived classes should use protected constructors.

Parameters:
name - Name of the syntax
stgy - An associated syntax strategy.
id - The syntax ID, which should come from directory meta-data
Method Detail

createValueComponent

public ValueComponent createValueComponent()
Creates a ValueList object.

This is the only public method that creates new ValueList objects that take no parameters.

Returns:
The new ValueList object that contains all required Values, as defined by the syntax.

createValueComponent

public ValueComponent createValueComponent(java.lang.Object initData)
                                    throws ComponentCreationException
Creates a ValueComponent for a particular syntax.

This is the only public method that creates new ValueList objects that can specify initialization data.

Parameters:
initData - Initialization data value that is inserted into the ValueComponent.
Returns:
A new ValueComponent object.
Throws:
ComponentCreationException - Thrown when initData does not contain the required data for value creation, or when the syntax is not a composite type.

getId

public int getId()
Returns the ID of the syntax.

Returns:
The syntax ID.

getName

public java.lang.String getName()
Returns the name of the syntax.

Returns:
The syntax name.

getStrategy

public Strategy getStrategy()
Returns the strategy associated with this syntax.

Returns:
The strategy associated with this syntax.

toString

public java.lang.String toString()
Returns the string representation of this syntax.

Returns:
A string representation of the syntax name.


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.