org.kuali.rice.kns.datadictionary
Class AttributeDefinition

java.lang.Object
  extended by org.kuali.rice.kns.datadictionary.DataDictionaryDefinitionBase
      extended by org.kuali.rice.kns.datadictionary.AttributeDefinition
All Implemented Interfaces:
Serializable, DataDictionaryDefinition, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
ExternalizableAttributeDefinitionProxy, KimAttributeDefinition

public class AttributeDefinition
extends DataDictionaryDefinitionBase
implements org.springframework.beans.factory.InitializingBean

A single attribute definition in the DataDictionary, which contains information relating to the display, validation, and general maintenance of a specific attribute of an entry.

See Also:
Serialized Form

Field Summary
protected  AttributeSecurity attributeSecurity
           
protected  ControlDefinition control
           
protected  String description
           
protected  String displayLabelAttribute
           
protected  BigDecimal exclusiveMin
           
protected  Boolean forceUppercase
           
protected  String formatterClass
           
protected  BigDecimal inclusiveMax
           
protected  String label
           
protected  Integer maxLength
           
protected  String name
           
protected  Boolean required
           
protected  String shortLabel
           
protected  String summary
           
protected  Boolean unique
           
protected  ValidationPattern validationPattern
           
 
Fields inherited from class org.kuali.rice.kns.datadictionary.DataDictionaryDefinitionBase
id
 
Constructor Summary
AttributeDefinition()
           
 
Method Summary
 void afterPropertiesSet()
          This overridden method ...
 void completeValidation(Class rootObjectClass, Class otherObjectClass)
          Directly validate simple fields, call completeValidation on Definition fields.
 AttributeSecurity getAttributeSecurity()
           
 ControlDefinition getControl()
           
 String getDescription()
           
protected  String getDirectShortLabel()
           
 String getDisplayLabelAttribute()
           
 BigDecimal getExclusiveMin()
           
 Boolean getForceUppercase()
           
 String getFormatterClass()
           
 BigDecimal getInclusiveMax()
          The inclusiveMax element determines the maximum allowable value for data entry editing purposes.
 String getLabel()
           
 Integer getMaxLength()
           
 String getName()
           
 String getShortLabel()
           
 String getSummary()
           
 Boolean getUnique()
           
 ValidationPattern getValidationPattern()
           
 boolean hasAttributeSecurity()
           
 boolean hasFormatterClass()
           
 boolean hasValidationPattern()
           
 Boolean isRequired()
           
 void setAttributeSecurity(AttributeSecurity attributeSecurity)
           
 void setControl(ControlDefinition control)
          The control element defines the manner in which an attribute is displayed and the manner in which the attribute value is entered.
 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 setExclusiveMin(BigDecimal exclusiveMin)
          The exclusiveMin element determines the minimum allowable value for data entry editing purposes.
 void setForceUppercase(Boolean forceUppercase)
          forceUppercase = convert user entry to uppercase and always display database value as uppercase.
 void setFormatterClass(String formatterClass)
          The formatterClass element is used when custom formatting is required for display of the field value.
 void setInclusiveMax(BigDecimal inclusiveMax)
          The inclusiveMax element determines the maximum allowable value for data entry editing purposes.
 void setLabel(String label)
          The label element is the field or collection name that will be shown on inquiry and maintenance screens.
 void setMaxLength(Integer maxLength)
          The maxLength element determines the maximum size of the field for data entry edit purposes and for display purposes.
 void setName(String name)
           
 void setRequired(Boolean required)
          The required element allows values of "true" or "false".
 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 setSummary(String summary)
          The summary element is used to provide a short description of the attribute or collection.
 void setUnique(Boolean unique)
           
 void setValidationPattern(ValidationPattern validationPattern)
          The validationPattern element defines the allowable character-level or field-level values for an attribute.
 String toString()
           
 
Methods inherited from class org.kuali.rice.kns.datadictionary.DataDictionaryDefinitionBase
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

forceUppercase

protected Boolean forceUppercase

name

protected String name

label

protected String label

shortLabel

protected String shortLabel

displayLabelAttribute

protected String displayLabelAttribute

maxLength

protected Integer maxLength

unique

protected Boolean unique

exclusiveMin

protected BigDecimal exclusiveMin

inclusiveMax

protected BigDecimal inclusiveMax

validationPattern

protected ValidationPattern validationPattern

required

protected Boolean required

control

protected ControlDefinition control

summary

protected String summary

description

protected String description

formatterClass

protected String formatterClass

attributeSecurity

protected AttributeSecurity attributeSecurity
Constructor Detail

AttributeDefinition

public AttributeDefinition()
Method Detail

setForceUppercase

public void setForceUppercase(Boolean forceUppercase)
forceUppercase = convert user entry to uppercase and always display database value as uppercase.


getForceUppercase

public Boolean getForceUppercase()

getName

public String getName()

setName

public void setName(String name)

getLabel

public String getLabel()

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.


getMaxLength

public Integer getMaxLength()

setMaxLength

public void setMaxLength(Integer maxLength)
The maxLength element determines the maximum size of the field for data entry edit purposes and for display purposes.


getExclusiveMin

public BigDecimal getExclusiveMin()

setExclusiveMin

public void setExclusiveMin(BigDecimal exclusiveMin)
The exclusiveMin element determines the minimum allowable value for data entry editing purposes. Value can be an integer or decimal value such as -.001 or 99.


getInclusiveMax

public BigDecimal getInclusiveMax()
The inclusiveMax element determines the maximum allowable value for data entry editing purposes. Value can be an integer or decimal value such as -.001 or 99. JSTL: This field is mapped into the field named "exclusiveMax".


setInclusiveMax

public void setInclusiveMax(BigDecimal inclusiveMax)
The inclusiveMax element determines the maximum allowable value for data entry editing purposes. Value can be an integer or decimal value such as -.001 or 99. JSTL: This field is mapped into the field named "exclusiveMax".


hasValidationPattern

public boolean hasValidationPattern()
Returns:
true if a validationPattern has been set

getValidationPattern

public ValidationPattern getValidationPattern()

setValidationPattern

public void setValidationPattern(ValidationPattern validationPattern)
The validationPattern element defines the allowable character-level or field-level values for an attribute. JSTL: validationPattern is a Map which is accessed using a key of "validationPattern". Each entry may contain some of the keys listed below. The keys that may be present for a given attribute are dependent upon the type of validationPattern. maxLength (String) exactLength type allowWhitespace allowUnderscore allowPeriod validChars precision scale allowNegative The allowable keys (in addition to type) for each type are: Type**** ***Keys*** alphanumeric exactLength maxLength allowWhitespace allowUnderscore allowPeriod alpha exactLength maxLength allowWhitespace anyCharacter exactLength maxLength allowWhitespace charset validChars numeric exactLength maxLength fixedPoint allowNegative precision scale floatingPoint allowNegative date n/a emailAddress n/a javaClass n/a month n/a phoneNumber n/a timestamp n/a year n/a zipcode n/a Note: maxLength and exactLength are mutually exclusive. If one is entered, the other may not be entered. Note: See ApplicationResources.properties for exact regex patterns. e.g. validationPatternRegex.date for regex used in date validation.


setRequired

public void setRequired(Boolean required)
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.


isRequired

public Boolean isRequired()

getControl

public ControlDefinition getControl()
Returns:
control

setControl

public void setControl(ControlDefinition control)
The control element defines the manner in which an attribute is displayed and the manner in which the attribute value is entered. JSTL: control is a Map representing an HTML control. It is accessed using a key of "control". The table below shows the types of entries associated with each type of control. Control Type** **Key** **Value** checkbox checkbox boolean String hidden hidden boolean String radio radio boolean String valuesFinder valuesFinder class name businessObjectClass String keyAttribute String labelAttribute String includeKeyInLabel boolean String select select boolean String valuesFinder valuesFinder class name businessObjectClass String keyAttribute String labelAttribute String includeBlankRow boolean String includeKeyInLabel boolean String apcSelect apcSelect boolean String paramNamespace String parameterDetailType String parameterName String text text boolean String size String textarea textarea boolean String rows cols currency currency boolean String size String formattedMaxLength String kualiUser kualiUser boolean String universalIdAttributeName String userIdAttributeName String personNameAttributeName String lookupHidden lookupHidden boolean String lookupReadonly lookupReadonly boolean String

Parameters:
control -
Throws:
IllegalArgumentException - if the given control is null

getSummary

public String getSummary()

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

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.


hasFormatterClass

public boolean hasFormatterClass()

getFormatterClass

public String getFormatterClass()

setFormatterClass

public void setFormatterClass(String formatterClass)
The formatterClass element is used when custom formatting is required for display of the field value. This field specifies the name of the java class to be used for the formatting. About 15 different classes are available including BooleanFormatter, CurrencyFormatter, DateFormatter, etc.


completeValidation

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

Specified by:
completeValidation in interface DataDictionaryDefinition
Parameters:
rootObjectClass - Class of the BusinessObjectEntry which ultimately contains this definition
otherObjectClass - other stuff required to complete validation
See Also:
DataDictionaryEntry.completeValidation()

toString

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

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.


getAttributeSecurity

public AttributeSecurity getAttributeSecurity()
Returns:
the attributeSecurity

setAttributeSecurity

public void setAttributeSecurity(AttributeSecurity attributeSecurity)
Parameters:
attributeSecurity - the attributeSecurity to set

hasAttributeSecurity

public boolean hasAttributeSecurity()

afterPropertiesSet

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

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

getUnique

public Boolean getUnique()
Returns:
the unique

setUnique

public void setUnique(Boolean unique)
Parameters:
unique - the unique to set


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