org.kuali.rice.krad.datadictionary
Class ReferenceDefinition

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
          extended by org.kuali.rice.krad.datadictionary.ReferenceDefinition
All Implemented Interfaces:
Serializable, DataDictionaryDefinition, DictionaryBean, org.springframework.beans.factory.InitializingBean

public class ReferenceDefinition
extends DataDictionaryDefinitionBase

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:
Serialized Form

Field Summary
protected  String attributeName
           
protected  String attributeToHighlightOnFail
           
protected  Class<? extends BusinessObject> businessObjectClass
           
protected  String collection
           
protected  Class<? extends BusinessObject> collectionBusinessObjectClass
           
protected  String displayFieldName
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
id
 
Constructor Summary
ReferenceDefinition()
           
 
Method Summary
 void completeValidation(Class rootBusinessObjectClass, Class otherBusinessObjectClass)
          Directly validate simple fields.
 String getAttributeName()
           
 String getAttributeToHighlightOnFail()
          Gets the attributeToHighlightOnFail attribute.
 Class<? extends BusinessObject> getBusinessObjectClass()
           
 String getCollection()
           
 Class<? extends BusinessObject> getCollectionBusinessObjectClass()
           
 String getDisplayFieldName()
          Gets the displayFieldName attribute.
 boolean isCollectionReference()
           
 boolean isDisplayFieldNameSet()
          This method returns true if the displayFieldName is set, otherwise it returns false.
 void setAttributeName(String attributeName)
          attributeName is the name of a reference object that must exist and not be null.
 void setAttributeToHighlightOnFail(String attributeToHighlightOnFail)
          attributeToHighlightOnFail is the name of the busines object attribute which will be highlighted when the default existence check fails.
 void setBusinessObjectClass(Class<? extends BusinessObject> businessObjectClass)
           
 void setCollection(String collection)
          collection is the name of a collection that must exist
 void setCollectionBusinessObjectClass(Class<? extends BusinessObject> collectionBusinessObjectClass)
          Class that the specified collection represents.
 void setDisplayFieldName(String displayFieldName)
          displayFieldName is the name of the field to pull the label as it will appear in an error message.
 String toString()
           
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
afterPropertiesSet, getId, setId
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, copyProperties, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 

Field Detail

attributeName

protected String attributeName

attributeToHighlightOnFail

protected String attributeToHighlightOnFail

displayFieldName

protected String displayFieldName

collection

protected String collection

collectionBusinessObjectClass

protected Class<? extends BusinessObject> collectionBusinessObjectClass

businessObjectClass

protected Class<? extends BusinessObject> businessObjectClass
Constructor Detail

ReferenceDefinition

public ReferenceDefinition()
Method Detail

getAttributeName

public String getAttributeName()
Returns:
attributeName

setAttributeName

public void setAttributeName(String attributeName)
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

public String getAttributeToHighlightOnFail()
Gets the attributeToHighlightOnFail attribute.

Returns:
Returns the attributeToHighlightOnFail.

setAttributeToHighlightOnFail

public void setAttributeToHighlightOnFail(String attributeToHighlightOnFail)
attributeToHighlightOnFail is the name of the busines object attribute which will be highlighted when the default existence check fails.


getDisplayFieldName

public String getDisplayFieldName()
Gets the displayFieldName attribute.

Returns:
Returns the displayFieldName.

setDisplayFieldName

public void setDisplayFieldName(String displayFieldName)
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:

getCollection

public String getCollection()

setCollection

public void setCollection(String collection)
collection is the name of a collection that must exist


isCollectionReference

public boolean isCollectionReference()

getCollectionBusinessObjectClass

public Class<? extends BusinessObject> getCollectionBusinessObjectClass()

setCollectionBusinessObjectClass

public void setCollectionBusinessObjectClass(Class<? extends BusinessObject> collectionBusinessObjectClass)
Class that the specified collection represents. Does not need to be set. The DD Will set this attribute through introspection.


completeValidation

public void completeValidation(Class rootBusinessObjectClass,
                               Class otherBusinessObjectClass)
Directly validate simple fields.

Parameters:
rootBusinessObjectClass - Class of the BusinessObjectEntry which ultimately contains this definition
otherBusinessObjectClass - other stuff required to complete validation
See Also:
org.kuali.rice.krad.datadictionary.DataDictionaryDefinition#completeValidation(java.lang.Class, java.lang.Object)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getBusinessObjectClass

public Class<? extends BusinessObject> getBusinessObjectClass()

setBusinessObjectClass

public void setBusinessObjectClass(Class<? extends BusinessObject> businessObjectClass)


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