org.kuali.rice.krad.datadictionary
Class AttributeDefinitionBase

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.AttributeDefinitionBase
All Implemented Interfaces:
Serializable, DataDictionaryDefinition, DictionaryBean, Constrainable, ExistenceConstrainable, SimpleConstrainable, Constraint, ExistenceConstraint, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
AttributeDefinition, ComplexAttributeDefinition

public abstract class AttributeDefinitionBase
extends DataDictionaryDefinitionBase
implements ExistenceConstrainable, SimpleConstrainable

Common class for attribute definitions in the DataDictionary, which contains information relating to the display, validation, and general maintenance of a specific attribute of an entry. An attribute can be a simple or complex attribute

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

Field Summary
protected  String constraintText
           
protected  String description
           
protected  String displayLabelAttribute
           
protected  String label
           
protected  String name
           
protected  String shortLabel
           
protected  SimpleConstraint simpleConstraint
           
protected  String summary
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
id
 
Constructor Summary
AttributeDefinitionBase()
           
 
Method Summary
 String getConstraintText()
          Text that display a restriction on the value a field can hold
 String getDescription()
          The description element is used to provide a long description of the attribute or collection.
protected  String getDirectShortLabel()
           
 String getDisplayLabelAttribute()
           
 String getLabel()
          The label element is the field or collection name that will be shown on inquiry and maintenance screens.
 String getName()
          Name of the attribute
 String getShortLabel()
           
 SimpleConstraint getSimpleConstraint()
          Gets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.
 String getSummary()
          The summary element is used to provide a short description of the attribute or collection.
 Boolean isRequired()
          The required element allows values of "true" or "false".
 void setConstraintText(String constraintText)
          Setter for the constraint message text
 void setDescription(String description)
          The description element is used to provide a long description of the attribute or collection.
 void setDisplayLabelAttribute(String displayLabelAttribute)
          The displayLabelAttribute element is used to indicate that the label and short label should be obtained from another attribute.
 void setLabel(String label)
          The label element is the field or collection name that will be shown on inquiry and maintenance screens.
 void setName(String name)
          Name of the attribute
 void setRequired(Boolean required)
          Sets if this attribute is required
 void setShortLabel(String shortLabel)
          The shortLabel element is the field or collection name that will be used in applications when a shorter name (than the label element) is required.
 void setSimpleConstraint(SimpleConstraint simpleConstraint)
          Sets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.
 void setSummary(String summary)
          The summary element is used to provide a short description of the attribute or collection.
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase
afterPropertiesSet, getId, setId
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
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.DataDictionaryDefinition
completeValidation
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 

Field Detail

name

protected String name

label

protected String label

shortLabel

protected String shortLabel

displayLabelAttribute

protected String displayLabelAttribute

constraintText

protected String constraintText

summary

protected String summary

description

protected String description

simpleConstraint

protected SimpleConstraint simpleConstraint
Constructor Detail

AttributeDefinitionBase

public AttributeDefinitionBase()
Method Detail

getName

public String getName()
Name of the attribute

Specified by:
getName in interface Constrainable
Returns:
the name

setName

public void setName(String name)
Name of the attribute

Parameters:
name -

getLabel

public String getLabel()
The label element is the field or collection name that will be shown on inquiry and maintenance screens. This will be overridden by presence of displayLabelAttribute element.

Returns:
the label

setLabel

public void setLabel(String label)
The label element is the field or collection name that will be shown on inquiry and maintenance screens. This will be overridden by presence of displayLabelAttribute element.


getShortLabel

public String getShortLabel()
Returns:
the shortLabel, or the label if no shortLabel has been set

getDirectShortLabel

protected String getDirectShortLabel()
Returns:
the shortLabel directly, without substituting in the label

setShortLabel

public void setShortLabel(String shortLabel)
The shortLabel element is the field or collection name that will be used in applications when a shorter name (than the label element) is required. This will be overridden by presence of displayLabelAttribute element.


getConstraintText

public String getConstraintText()
Text that display a restriction on the value a field can hold

For example when the value must be a valid format (phone number, email), certain length, min/max value and so on this text can be used to indicate the constraint to the user. Generally displays with the control so it is visible when the user tabs to the field

Returns:
String text to display for the constraint message

setConstraintText

public void setConstraintText(String constraintText)
Setter for the constraint message text

Parameters:
constraintText -

getSummary

public String getSummary()
The summary element is used to provide a short description of the attribute or collection. This is designed to be used for help purposes.

Returns:
the summary

setSummary

public void setSummary(String summary)
The summary element is used to provide a short description of the attribute or collection. This is designed to be used for help purposes.


getDescription

public String getDescription()
The description element is used to provide a long description of the attribute or collection. This is designed to be used for help purposes.

Returns:
the description

setDescription

public void setDescription(String description)
The description element is used to provide a long description of the attribute or collection. This is designed to be used for help purposes.


getDisplayLabelAttribute

public String getDisplayLabelAttribute()

setDisplayLabelAttribute

public void setDisplayLabelAttribute(String displayLabelAttribute)
The displayLabelAttribute element is used to indicate that the label and short label should be obtained from another attribute. The label element and short label element defined for this attribute will be overridden. Instead, the label and short label values will be obtained by referencing the corresponding values from the attribute indicated by this element.


getSimpleConstraint

public SimpleConstraint getSimpleConstraint()
Gets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.

Specified by:
getSimpleConstraint in interface SimpleConstrainable
Returns:
SimpleConstraint object

setSimpleConstraint

public void setSimpleConstraint(SimpleConstraint simpleConstraint)
Sets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.

Parameters:
simpleConstraint -

setRequired

public void setRequired(Boolean required)
Sets if this attribute is required

Parameters:
required - true when required, false otherwise

isRequired

public Boolean isRequired()
The required element allows values of "true" or "false". A value of "true" indicates that a value must be entered for this business object when creating or editing a new business object.

Specified by:
isRequired in interface ExistenceConstraint


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