org.kuali.rice.krad.datadictionary
Class DataDictionaryEntryBase

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.DataDictionaryEntryBase
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DataDictionaryEntry, DictionaryBean
Direct Known Subclasses:
DataObjectEntry, DocumentEntry

public abstract class DataDictionaryEntryBase
extends DictionaryBeanBase
implements DataDictionaryEntry, Serializable

Contains common properties and methods for data dictionary entries

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
protected  Map<String,AttributeDefinition> attributeMap
           
protected  List<AttributeDefinition> attributes
           
protected  Map<String,CollectionDefinition> collectionMap
           
protected  List<CollectionDefinition> collections
           
protected  Map<String,ComplexAttributeDefinition> complexAttributeMap
           
protected  List<ComplexAttributeDefinition> complexAttributes
           
protected  DataObjectMetadata dataObjectMetadata
           
protected static Set<String> EXCLUDED_PROPERTY_NAMES
           
protected  Map<String,RelationshipDefinition> relationshipMap
           
protected  List<RelationshipDefinition> relationships
           
protected  StateMapping stateMapping
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Constructor Summary
DataDictionaryEntryBase()
           
 
Method Summary
 void completeValidation()
          Directly validate simple fields, call completeValidation on Definition fields.
 void completeValidation(ValidationTrace tracer)
          Directly validate simple fields, call completeValidation on Definition fields.
 void dataDictionaryPostProcessing()
          Perform any needed post-processing of the bean properties.
protected  void embedMetadata()
           
 AttributeDefinition getAttributeDefinition(String attributeName)
           
 Set<String> getAttributeNames()
           
 List<AttributeDefinition> getAttributes()
           
 CollectionDefinition getCollectionDefinition(String collectionName)
           
 Set<String> getCollectionNames()
           
 List<CollectionDefinition> getCollections()
           
 List<ComplexAttributeDefinition> getComplexAttributes()
           
 DataObjectMetadata getDataObjectMetadata()
           
abstract  Class<?> getEntryClass()
           
 RelationshipDefinition getRelationshipDefinition(String relationshipName)
           
 Map<String,RelationshipDefinition> getRelationshipMap()
           
 Set<String> getRelationshipNames()
           
 List<RelationshipDefinition> getRelationships()
           
 StateMapping getStateMapping()
          StateMapping for this DataDictionaryEntry, this represents the states of this entry, their names, and where to find the state information on the model
 boolean hasEmbeddedDataObjectMetadata()
           
protected  boolean hasExcludedHint(DataObjectAttribute attr)
          Check the UifDisplayHints on an attribute, return true if any of them have the EXCLUDE type.
protected  void injectMetadataIntoAttributes(DataObjectMetadata dataObjectMetadata)
           
protected  void injectMetadataIntoCollections(DataObjectMetadata dataObjectMetadata)
           
protected  void injectMetadataIntoRelationships(DataObjectMetadata dataObjectMetadata)
          Inject the metadata into the relationship definitions.
 void setAttributes(List<AttributeDefinition> attributes)
          The attributes element contains attribute elements.
 void setCollections(List<CollectionDefinition> collections)
          The collections element contains collection elements.
 void setComplexAttributes(List<ComplexAttributeDefinition> complexAttributes)
           
 void setDataObjectMetadata(DataObjectMetadata dataObjectMetadata)
           
 void setRelationshipMap(Map<String,RelationshipDefinition> relationshipMap)
           
 void setRelationships(List<RelationshipDefinition> relationships)
          The relationships element contains relationship elements.
 void setStateMapping(StateMapping stateMapping)
          Set the StateMapping object which represents state information for this entry
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, getComponentCode, getNamespaceCode, preventModification, setComponentCode, setNamespaceCode, unwrap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DataDictionaryEntry
getFullClassName, getJstlKey
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 

Field Detail

dataObjectMetadata

protected DataObjectMetadata dataObjectMetadata

attributes

protected List<AttributeDefinition> attributes

complexAttributes

protected List<ComplexAttributeDefinition> complexAttributes

collections

protected List<CollectionDefinition> collections

relationships

protected List<RelationshipDefinition> relationships

attributeMap

protected Map<String,AttributeDefinition> attributeMap

complexAttributeMap

protected Map<String,ComplexAttributeDefinition> complexAttributeMap

collectionMap

protected Map<String,CollectionDefinition> collectionMap

relationshipMap

protected Map<String,RelationshipDefinition> relationshipMap

stateMapping

protected StateMapping stateMapping

EXCLUDED_PROPERTY_NAMES

protected static final Set<String> EXCLUDED_PROPERTY_NAMES
Constructor Detail

DataDictionaryEntryBase

public DataDictionaryEntryBase()
Method Detail

getEntryClass

public abstract Class<?> getEntryClass()

getAttributeDefinition

public AttributeDefinition getAttributeDefinition(String attributeName)
Specified by:
getAttributeDefinition in interface DataDictionaryEntry
Parameters:
attributeName -
Returns:
AttributeDefinition with the given name, or null if none with that name exists

getAttributes

public List<AttributeDefinition> getAttributes()
Returns:
a Map containing all AttributeDefinitions associated with this BusinessObjectEntry, indexed by attributeName

getComplexAttributes

public List<ComplexAttributeDefinition> getComplexAttributes()
Returns:
the complexAttributes

setComplexAttributes

public void setComplexAttributes(List<ComplexAttributeDefinition> complexAttributes)
Parameters:
complexAttributes - the complexAttributes to set

getCollectionDefinition

public CollectionDefinition getCollectionDefinition(String collectionName)
Parameters:
collectionName -
Returns:
CollectionDefinition with the given name, or null if none with that name exists

getCollections

public List<CollectionDefinition> getCollections()
Returns:
a Map containing all CollectionDefinitions associated with this BusinessObjectEntry, indexed by collectionName

getRelationshipDefinition

public RelationshipDefinition getRelationshipDefinition(String relationshipName)
Parameters:
relationshipName -
Returns:
RelationshipDefinition with the given name, or null if none with that name exists

getRelationships

public List<RelationshipDefinition> getRelationships()
Specified by:
getRelationships in interface DataDictionaryEntry
Returns:
a Map containing all RelationshipDefinitions associated with this BusinessObjectEntry, indexed by relationshipName

completeValidation

public void completeValidation()
Directly validate simple fields, call completeValidation on Definition fields.

Specified by:
completeValidation in interface DataDictionaryEntry

embedMetadata

protected void embedMetadata()

injectMetadataIntoRelationships

protected void injectMetadataIntoRelationships(DataObjectMetadata dataObjectMetadata)
Inject the metadata into the relationship definitions. Unlike attributes, in this case we only add missing relationships. If a relationship was defined for a given attribute we leave it alone.

Parameters:
dataObjectMetadata -

injectMetadataIntoCollections

protected void injectMetadataIntoCollections(DataObjectMetadata dataObjectMetadata)

injectMetadataIntoAttributes

protected void injectMetadataIntoAttributes(DataObjectMetadata dataObjectMetadata)

hasExcludedHint

protected boolean hasExcludedHint(DataObjectAttribute attr)
Check the UifDisplayHints on an attribute, return true if any of them have the EXCLUDE type.


dataDictionaryPostProcessing

public void dataDictionaryPostProcessing()
Description copied from interface: DictionaryBean
Perform any needed post-processing of the bean properties. This will be called starting at the parent data object entry or document entry class and recursed down though all other DictionaryBean objects contained within.

Specified by:
dataDictionaryPostProcessing in interface DictionaryBean
Overrides:
dataDictionaryPostProcessing in class DictionaryBeanBase

completeValidation

public void completeValidation(ValidationTrace tracer)
Directly validate simple fields, call completeValidation on Definition fields.

Specified by:
completeValidation in interface DataDictionaryEntry
Parameters:
tracer - - Record of object's location
See Also:
DataDictionaryEntry.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)

setAttributes

public void setAttributes(List<AttributeDefinition> attributes)
The attributes element contains attribute elements. These define the specifications for business object fields. JSTL: attributes is a Map which is accessed by a key of "attributes". This map contains entries with the following keys: attributeName of first attribute attributeName of second attribute etc. The corresponding value for each entry is an attribute ExportMap. By the time the JSTL export happens, all attributeReferences will be indistinguishable from attributes. See AttributesMapBuilder.java The attribute element specifies the way in which a business object field appears on a screen for data entry or display purposes. These specifications include the following: The title and formatting of the field Descriptive information about the field The edits used at time of data-entry DD: See AttributeDefinition.java JSTL: attribute is a Map which is accessed using a key which is the attributeName of an attribute. Each entry contains the following keys: name (String) forceUppercase (boolean String) label (String) shortLabel (String, copied from label if not present) maxLength (String) exclusiveMin (bigdecimal String) exclusiveMax (bigdecimal String) validationPattern (Map, optional) required (boolean String) control (Map) summary (String) description (String) formatterClass (String, optional) fullClassName (String) displayWorkgroup(String, optional) displayMaskClass(String, optional) See AttributesMapBuilder.java Note: exclusiveMax is mapped from the inclusiveMax element! The validation logic seems to be assuming inclusiveMax.


setCollections

public void setCollections(List<CollectionDefinition> collections)
The collections element contains collection elements. These define the lists of other business objects which are related to and defined in the business objects. JSTL: collections is a Map which is accessed by a key of "collections". This map contains entries with the following keys: name of first collection name of second collection etc. The corresponding value for each entry is a collection ExportMap. The collection element defines the name and description a list of objects related to the business object. DD: See CollectionDefinition.java. JSTL: collection is a Map which is accessed using a key which is the name of the collection. Each entry contains the following keys: name (String) label (String) shortLabel (String, copied from label if missing) elementLabel (String, copied from contained class if missing) summary (String) description (String) See CollectionsMapBuilder.java.


setRelationships

public void setRelationships(List<RelationshipDefinition> relationships)
The relationships element contains relationship elements. These are used to map attribute names to fields in a reference object. JSTL: relationships is a Map which is accessed by a key of "relationships". This map contains entries with the following keys: objectAttributeName of first relationship objectAttributeName of second relationship etc. The corresponding value for each entry is a relationship ExportMap. The relationship element defines how primitive attributes of this class can be used to retrieve an instance of some related Object instance DD: See RelationshipDefinition.java. JSTL: relationship is a Map which is accessed using a key which is the objectAttributeName of a relationship. The map contains a single entry with a key of "primitiveAttributes" and value which is an attributesMap ExportMap. The attributesMap ExportMap contains the following keys: 0 (for first primitiveAttribute) 1 (for second primitiveAttribute) etc. The corresponding value for each entry is an primitiveAttribute ExportMap which contains the following keys: "sourceName" "targetName" See RelationshipsMapBuilder.java.


getCollectionNames

public Set<String> getCollectionNames()

getAttributeNames

public Set<String> getAttributeNames()

getRelationshipNames

public Set<String> getRelationshipNames()

getStateMapping

public StateMapping getStateMapping()
Description copied from interface: DataDictionaryEntry
StateMapping for this DataDictionaryEntry, this represents the states of this entry, their names, and where to find the state information on the model

Specified by:
getStateMapping in interface DataDictionaryEntry
Returns:
StateMapping object
See Also:
DataDictionaryEntry.getStateMapping()

setStateMapping

public void setStateMapping(StateMapping stateMapping)
Description copied from interface: DataDictionaryEntry
Set the StateMapping object which represents state information for this entry

Specified by:
setStateMapping in interface DataDictionaryEntry
Parameters:
stateMapping - StateMapping object
See Also:
DataDictionaryEntry.setStateMapping(org.kuali.rice.krad.datadictionary.state.StateMapping)

hasEmbeddedDataObjectMetadata

public boolean hasEmbeddedDataObjectMetadata()

getDataObjectMetadata

public DataObjectMetadata getDataObjectMetadata()

setDataObjectMetadata

public void setDataObjectMetadata(DataObjectMetadata dataObjectMetadata)

getRelationshipMap

public Map<String,RelationshipDefinition> getRelationshipMap()

setRelationshipMap

public void setRelationshipMap(Map<String,RelationshipDefinition> relationshipMap)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.