Class ReferenceDefinition
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
org.kuali.rice.krad.datadictionary.ReferenceDefinition
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DataDictionaryDefinition,DictionaryBean
The reference element specifies the name of a reference
object that is required to exist in order for the primary
business object to be created or modified on a BO.
DD: See ReferenceDefinition.java
JSTL: references are Maps with the following keys:
attributeName (String)
activeIndicatorAttributeName (String)
activeIndicatorReversed (boolean String)
attributeToHighlightOnFail (String)
displayFieldName (String)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Class<?> protected Stringprotected Class<?> protected StringFields inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
embeddedDataObjectMetadata, generatedFromMetadata, idFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(Class<?> rootBusinessObjectClass, Class<?> otherBusinessObjectClass, ValidationTrace tracer) Empty implementation so that all subclasses do not need to implement this method if they have no local validation to perform.voidPerform any needed post-processing of the bean properties.Gets the attributeToHighlightOnFail attribute.Class<?> Class<?> Gets the displayFieldName attribute.booleanbooleanThis method returns true if the displayFieldName is set, otherwise it returns false.voidsetAttributeName(String attributeName) attributeName is the name of a reference object that must exist and not be null.voidsetAttributeToHighlightOnFail(String attributeToHighlightOnFail) attributeToHighlightOnFail is the name of the busines object attribute which will be highlighted when the default existence check fails.voidsetBusinessObjectClass(Class<?> businessObjectClass) voidsetCollection(String collection) collection is the name of a collection that must existvoidsetCollectionBusinessObjectClass(Class<?> collectionBusinessObjectClass) Class that the specified collection represents.voidsetDisplayFieldName(String displayFieldName) displayFieldName is the name of the field to pull the label as it will appear in an error message.Methods inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
completeValidation, getId, hasEmbeddedDataObjectMetadata, setEmbeddedDataObjectMetadata, setGeneratedFromMetadata, setId, wasGeneratedFromMetadataMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
-
Field Details
-
attributeName
-
attributeToHighlightOnFail
-
displayFieldName
-
collection
-
collectionBusinessObjectClass
-
businessObjectClass
-
-
Constructor Details
-
ReferenceDefinition
public ReferenceDefinition()
-
-
Method Details
-
getAttributeName
- Returns:
- attributeName
-
setAttributeName
attributeName is the name of a reference object that must exist and not be null. In the case of a collection, then this is the name of a reference object within the collection element.- Throws:
IllegalArgumentException- if the given attributeName is blank
-
getAttributeToHighlightOnFail
Gets the attributeToHighlightOnFail attribute.- Returns:
- Returns the attributeToHighlightOnFail.
-
setAttributeToHighlightOnFail
attributeToHighlightOnFail is the name of the busines object attribute which will be highlighted when the default existence check fails. -
getDisplayFieldName
Gets the displayFieldName attribute.- Returns:
- Returns the displayFieldName.
-
setDisplayFieldName
displayFieldName is the name of the field to pull the label as it will appear in an error message. e.g. "chartOfAccountsCode". -
isDisplayFieldNameSet
public boolean isDisplayFieldNameSet()This method returns true if the displayFieldName is set, otherwise it returns false. Whether the displayFieldName is set is defined by whether it has any non-whitespace content in it.- Returns:
- true if the display field name is set
-
getCollection
-
setCollection
collection is the name of a collection that must exist -
isCollectionReference
public boolean isCollectionReference() -
getCollectionBusinessObjectClass
-
setCollectionBusinessObjectClass
Class that the specified collection represents. Does not need to be set. The DD Will set this attribute through introspection. -
dataDictionaryPostProcessing
public void dataDictionaryPostProcessing()Description copied from interface:DictionaryBeanPerform 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:
dataDictionaryPostProcessingin interfaceDictionaryBean- Overrides:
dataDictionaryPostProcessingin classDictionaryBeanBase
-
completeValidation
public void completeValidation(Class<?> rootBusinessObjectClass, Class<?> otherBusinessObjectClass, ValidationTrace tracer) Description copied from class:DataDictionaryDefinitionBaseEmpty implementation so that all subclasses do not need to implement this method if they have no local validation to perform.- Specified by:
completeValidationin interfaceDataDictionaryDefinition- Overrides:
completeValidationin classDataDictionaryDefinitionBase- Parameters:
rootBusinessObjectClass- Class of the BusinessObjectEntry which ultimately contains this definitionotherBusinessObjectClass- other stuff required to complete validationtracer-ValidationTraceclass used to track what was being validated at the time of any problems discovered
-
getBusinessObjectClass
-
setBusinessObjectClass
-