org.kuali.rice.krad.datadictionary
Class DataDictionaryEntryBase

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DataDictionaryEntryBase
All Implemented Interfaces:
Serializable, DataDictionaryEntry, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
DataObjectEntry, DocumentEntry

public abstract class DataDictionaryEntryBase
extends Object
implements DataDictionaryEntry, Serializable, org.springframework.beans.factory.InitializingBean

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  Map<String,RelationshipDefinition> relationshipMap
           
protected  List<RelationshipDefinition> relationships
           
 
Constructor Summary
DataDictionaryEntryBase()
           
 
Method Summary
 void afterPropertiesSet()
          This overridden method ...
 void completeValidation()
          Directly validate simple fields, call completeValidation on Definition fields.
 AttributeDefinition getAttributeDefinition(String attributeName)
           
 Set<String> getAttributeNames()
           
 List<AttributeDefinition> getAttributes()
           
 CollectionDefinition getCollectionDefinition(String collectionName)
           
 Set<String> getCollectionNames()
           
 List<CollectionDefinition> getCollections()
           
 List<ComplexAttributeDefinition> getComplexAttributes()
           
abstract  Class<?> getEntryClass()
           
 RelationshipDefinition getRelationshipDefinition(String relationshipName)
           
 Set<String> getRelationshipNames()
           
 List<RelationshipDefinition> getRelationships()
           
 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 setRelationships(List<RelationshipDefinition> relationships)
          The relationships element contains relationship elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DataDictionaryEntry
getFullClassName, getJstlKey
 

Field Detail

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
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

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()

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
This overridden method ...

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception
See Also:
InitializingBean.afterPropertiesSet()


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.