public class StructureDef extends java.lang.Object implements EditableStructureDefinition, StructureDefinitionListener
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_ACCESSOR |
TYPE_ATTRIBUTE, TYPE_CRITERIA, TYPE_CRITERIA_ITEM, TYPE_CRITERIA_OPERATOR, TYPE_CRITERIA_ROW, TYPE_DATACONTROL, TYPE_DEFINITION, TYPE_DEFINITIONCONTEXT, TYPE_NAMED, TYPE_OPERATION, TYPE_OPERATIONRETURN, TYPE_PARAMETER, TYPE_STRUCTURE, TYPE_VARIABLE| Constructor and Description |
|---|
StructureDef(java.lang.String fullName)
Creates a structure definition with a name.
|
StructureDef(java.lang.String name,
Definition parent)
Creates a structure definition with a name and a parent
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAccessor(AccessorDefinition accr)
Adds an accessor to the structure definition.
|
void |
addAttribute(AttributeDefinition attr)
Adds an attribute to the structure definition.
|
void |
addConstructorMethod(OperationDefinition method)
Adds a method to the structure definition.
|
void |
addCriteria(Criteria criteria)
Adds a criteria to the structure definition.
|
void |
addListener(StructureDefinitionListener listener)
Adds a listener to this structure definition
|
void |
addMethod(OperationDefinition method)
Adds a method to the structure definition.
|
void |
addProperties(java.util.Map props)
Adds custom properties to this object.
|
void |
addProperty(java.lang.String propName,
java.lang.Object value)
Adds a custom property to this object.
|
void |
clearMetadata()
In some cases we need to re-use the same struturedef but refresh it form another source.
|
protected Definition |
findInOperationDefinitions(java.lang.String definitionId)
Internal: Applications should not use this method.
|
DefinitionContainer |
getAccessorDefinitions()
Returns the metadata about the accessors in this structure.
|
DefinitionContainer |
getAttributeDefinitions()
Returns the metadata about the attributes in this structure.
|
DefinitionContainer |
getConstructorOperationDefinitions()
Returns the metadata about the constructor operations in this structure.
|
DefinitionContainer |
getCriteriaDefinitions()
Returns the metadata about the criteria in this structure.
|
DataControlDefinition |
getDataControlDefinition()
Retrieves the DataControlDefinition that this Structure belongs to.
|
Definition |
getDefinitionParent()
Returns the parent of this metadata definition, which is the Definition
that contains this Definition.
|
int |
getDefinitionType()
Retrieves the type of this definition.
|
java.lang.String |
getFullName()
Returns the full name of the definition.
|
java.lang.String |
getName()
Returns the name of this Definition.
|
DefinitionContainer |
getOperationDefinitions()
Returns the metadata about the operations in this structure.
|
java.util.Hashtable |
getProperties()
Returns a
Hashtable containing all the custom properties set
against this object. |
java.lang.Object |
getProperty(java.lang.String propName)
Returns a custom property value given its name.
|
protected void |
initAccessors()
Internal: Applications should not use this method.
Initializes the field mAccessors to ensure lazy initialization
|
protected void |
initAttributes()
Internal: Applications should not use this method.
Initializes the field mAttribs to ensure lazy initialization
|
protected void |
initCriteria()
Internal: Applications should not use this method.
Initializes the field mAttribs to ensure lazy initialization
|
protected void |
initMethods()
Internal: Applications should not use this method.
Initializes the field mMethods to ensure lazy initialization
|
protected boolean |
isAccessorListEmpty()
Internal: Applications should not use this method.
|
protected boolean |
isAttributeListEmpty()
Internal: Applications should not use this method.
|
protected boolean |
isCriteriaListEmpty()
Internal: Applications should not use this method.
|
protected boolean |
isMethodListEmpty()
Internal: Applications should not use this method.
|
protected void |
notifyStructureChanged() |
void |
removeListener(StructureDefinitionListener listener)
Removes listener from structure definition
|
void |
setFullName(java.lang.String fullName)
Sets the full name.
|
void |
setPackageName(java.lang.String pkg)
Sets the pacakge name for this definition.
|
void |
setParent(Definition parent)
Sets a parent to this definition.
|
void |
setParentType(int type)
Sets the parent type of this structure definition.
|
void |
structureChanged() |
public static final int TYPE_ACCESSOR
public StructureDef(java.lang.String fullName)
public StructureDef(java.lang.String name,
Definition parent)
public DefinitionContainer getAttributeDefinitions()
StructureDefinitiongetAttributeDefinitions in interface StructureDefinitionEmptyDefinitionContainer,
AttributeDefinitionpublic DefinitionContainer getOperationDefinitions()
StructureDefinitiongetOperationDefinitions in interface StructureDefinitionEmptyDefinitionContainer,
OperationDefinitionpublic DefinitionContainer getAccessorDefinitions()
StructureDefinitiongetAccessorDefinitions in interface StructureDefinitionEmptyDefinitionContainer,
AccessorDefinitionpublic DefinitionContainer getConstructorOperationDefinitions()
StructureDefinitiongetConstructorOperationDefinitions in interface StructureDefinitionEmptyDefinitionContainer,
OperationDefinitionpublic DefinitionContainer getCriteriaDefinitions()
StructureDefinitiongetCriteriaDefinitions in interface StructureDefinitionEmptyDefinitionContainer,
OperationDefinitionpublic DataControlDefinition getDataControlDefinition()
StructureDefinitiongetDataControlDefinition in interface StructureDefinitionpublic java.lang.String getFullName()
getFullName in interface NamedDefinitionpublic java.lang.String getName()
NamedDefinitiongetName in interface NamedDefinitionpublic Definition getDefinitionParent()
NamedDefinitiongetDefinitionParent in interface NamedDefinitionpublic int getDefinitionType()
DefinitiongetDefinitionType in interface Definitionpublic void setParentType(int type)
public void setFullName(java.lang.String fullName)
fullName - the full name of the structure.public void setPackageName(java.lang.String pkg)
public void addAttribute(AttributeDefinition attr)
attr - The attribute as a part of the structure.public void addAccessor(AccessorDefinition accr)
accr - The attribute as a part of the structure.public void addMethod(OperationDefinition method)
method - The method as a part of the structure.public void addConstructorMethod(OperationDefinition method)
method - The method as a part of the structure.public void addCriteria(Criteria criteria)
criteria - as a part of the structure.public void setParent(Definition parent)
public void addProperty(java.lang.String propName,
java.lang.Object value)
propName - Name of the custom propertyvalue - Value of the custom propertypublic java.lang.Object getProperty(java.lang.String propName)
getProperty in interface NamedDefinitionpropName - Name of the custom property whose value is to be
retrieved.public void addProperties(java.util.Map props)
props - properties have to be added.public java.util.Hashtable getProperties()
Hashtable containing all the custom properties set
against this object.getProperties in interface NamedDefinitionHashtable consisting of all the custom properties.public void clearMetadata()
public void addListener(StructureDefinitionListener listener)
EditableStructureDefinitionaddListener in interface EditableStructureDefinitionpublic void removeListener(StructureDefinitionListener listener)
EditableStructureDefinitionremoveListener in interface EditableStructureDefinitionpublic void structureChanged()
structureChanged in interface StructureDefinitionListenerprotected void notifyStructureChanged()
protected void initAttributes()
protected void initAccessors()
protected void initMethods()
protected void initCriteria()
protected final Definition findInOperationDefinitions(java.lang.String definitionId)
protected final boolean isAttributeListEmpty()
protected final boolean isAccessorListEmpty()
protected final boolean isCriteriaListEmpty()
protected final boolean isMethodListEmpty()