|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.admin.ns.ClassDefinition
This class represents the schema definition for a particular class.
Objects of this type are immutablem and any extensions to this class must enforce the immutable nature.
| Field Summary | |
protected java.util.ArrayList |
aliasNames
List of alias names. |
protected boolean |
auxiliary
|
protected java.util.ArrayList |
classContainmentNameList
List of classes that may contain this class. |
protected java.lang.String |
className
Name of the class. |
protected boolean |
container
Flags associated with this class. |
protected boolean |
effective
|
protected boolean |
expanded
Expanded flag means the tables above contain inherited attributes and classes in addition to the ones defined directly by the class. |
protected java.util.HashMap |
mandatoryAttributeTable
Table of mandatory attributes. |
protected java.util.HashMap |
namingAttributeTable
Table of naming attributes. |
protected boolean |
nonRemove
|
protected java.util.HashMap |
optionalAttributeTable
Table of optional attributes. |
protected SchemaDefinition |
schemaDef
Reference to the SchemaDefinition object for this class. |
protected java.util.ArrayList |
superClassNameList
List of classes that this class extends. |
| Constructor Summary | |
ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes)
Constructs a ClassDefinition object for a class. |
|
ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary)
Constructs a ClassDefinition object for a class. |
|
ClassDefinition(java.lang.String name,
java.lang.String[] aliasArray,
java.lang.String[] classContainmentNames,
java.lang.String[] superClassNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary,
SchemaDefinition schemaDef)
Constructs a ClassDefinition object for a class. |
|
| Method Summary | |
boolean |
canBeContainedBy(java.lang.String parentClass)
Checks to see if this class can be contained by another. |
java.lang.String[] |
getAliasNames()
Retrieves the alias names of the schema class. |
java.lang.String[] |
getContainmentClasses()
Retrieves the classes that this class can be contained in. |
boolean |
getExpanded()
Tests to see if this class definition is expanded or not. |
AttributeDefinition[] |
getMandatoryAttributes()
Retrieves the mandatory attributes of the schema class. |
java.lang.String |
getName()
Retrieves the name of the schema class. |
AttributeDefinition[] |
getNamingAttributes()
Retrieves the naming attributes of the schema class. |
AttributeDefinition[] |
getOptionalAttributes()
Retrieves the optional attributes of the schema class. |
java.lang.String[] |
getSuperClasses()
Retrieves the super classes of this schema class. |
boolean |
isAttributeMandatory(java.lang.String attrName)
Checks to see if a particular attribute is mandatory. |
boolean |
isAttributeOptional(java.lang.String attrName)
Checks to see if a particular attribute is optional. |
boolean |
isAuxiliary()
Tests to see if this is an Auxiliary class. |
boolean |
isClassUsingAttribute(java.lang.String attrName)
Checks to see if a particular attribute is being used by this class. |
boolean |
isContainer()
Tests to see if this is a container class. |
boolean |
isEffective()
Tests to see if this is an effective class. |
boolean |
isInheritedFrom(java.lang.String className)
Check to see if this is inherited from another specific class. |
boolean |
isNamedBy(java.lang.String attrName)
Checks to see if an attribute is listed as a naming attribute. |
boolean |
isNonRemovable()
Tests to see if this is an effective class. |
boolean |
isNonRemoveable()
Tests to see if this is an effective class. |
void |
setExpanded(boolean expanded)
Set the expanded flag. |
java.lang.String |
toString()
Retrieves the name of the schema class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.ArrayList aliasNames
protected boolean auxiliary
protected java.util.ArrayList classContainmentNameList
protected java.lang.String className
protected boolean container
protected boolean effective
protected boolean expanded
protected java.util.HashMap mandatoryAttributeTable
protected java.util.HashMap namingAttributeTable
protected boolean nonRemove
protected java.util.HashMap optionalAttributeTable
protected SchemaDefinition schemaDef
protected java.util.ArrayList superClassNameList
| Constructor Detail |
public ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes)
name - The name of the schema class.classContainmentNames - Names of classes that this class can be contained by.mandatoryAttributes - Array of mandatory attribute definitions.
This array may either be 'null' or empty if there are no mandatory attributes.namingAttributes - Array of naming attribute definitions.optionalAttributes - Array of optional attributes definitions.
This array may either be 'null' or empty if there are no optional attributes.public ClassDefinition(java.lang.String name,
java.lang.String[] classContainmentNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary)
name - The name of the schema class.classContainmentNames - Names of classes that this class can be contained by.mandatoryAttributes - Array of mandatory attribute definitions.
This array may either be 'null' or empty if there are no mandatory attributes.namingAttributes - Array of naming attribute definitions.optionalAttributes - Array of optional attributes definitions.
This array may either be 'null' or empty if there are no optional attributes.container - Flag indicating a container class.effective - Flag indicating an effective class.nonRemove - Flag indicating a non-removeable class.auxiliary - Flag indicating an auxiliary class.public ClassDefinition(java.lang.String name,
java.lang.String[] aliasArray,
java.lang.String[] classContainmentNames,
java.lang.String[] superClassNames,
AttributeDefinition[] mandatoryAttributes,
AttributeDefinition[] namingAttributes,
AttributeDefinition[] optionalAttributes,
boolean container,
boolean effective,
boolean nonRemove,
boolean auxiliary,
SchemaDefinition schemaDef)
name - The name of the schema class.aliasArray - The alternate names which can be used to access the class.classContainmentNames - Names of classes that this class can be contained by.superClassNames - Names of classes this class inherits from.mandatoryAttributes - Array of mandatory attribute definitions.
This array may either be 'null' or empty if there are no mandatory attributes.namingAttributes - Array of naming attribute definitions.optionalAttributes - Array of optional attributes definitions.
This array may either be 'null' or empty if there are no optional attributes.container - Flag indicating a container class.effective - Flag indicating an effective class.nonRemove - Flag indicating a non-removeable class.auxiliary - Flag indicating an auxiliary class.schemaDef - Reference to the SchemaDefinition object for this class.| Method Detail |
public boolean canBeContainedBy(java.lang.String parentClass)
This call should be done with an expanded class definition in order to properly test inherited containment rules.
This method cannot check that the parent class is a container. The preferred method is SchemaDefinition.canContain(parentClass, childClass)
If no containment rules have been given, we assume containment is possible.
parentClass - name of the class to check.
Must be the standard class name, not an alias.
public java.lang.String[] getAliasNames()
public java.lang.String[] getContainmentClasses()
public boolean getExpanded()
public AttributeDefinition[] getMandatoryAttributes()
public java.lang.String getName()
public AttributeDefinition[] getNamingAttributes()
public AttributeDefinition[] getOptionalAttributes()
public java.lang.String[] getSuperClasses()
public boolean isAttributeMandatory(java.lang.String attrName)
attrName - Name of the attribute to look for.
public boolean isAttributeOptional(java.lang.String attrName)
attrName - Name of the attribute to look for.
public boolean isAuxiliary()
public boolean isClassUsingAttribute(java.lang.String attrName)
attrName - Name of the attribute to look for.
public boolean isContainer()
public boolean isEffective()
public boolean isInheritedFrom(java.lang.String className)
className - name of the class to check.
public boolean isNamedBy(java.lang.String attrName)
attrName - name of the attribute being looked for.
public boolean isNonRemovable()
public boolean isNonRemoveable()
public void setExpanded(boolean expanded)
expanded - true if this class definition is expanded, false otherwise.public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||