|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.DictionaryBeanBase org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase org.kuali.rice.krad.datadictionary.AttributeDefinitionBase org.kuali.rice.krad.datadictionary.AttributeDefinition
public class AttributeDefinition
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.
Field Summary | |
---|---|
protected String |
additionalDisplayAttributeName
|
protected String |
alternateDisplayAttributeName
|
protected AttributeSecurity |
attributeSecurity
|
protected CaseConstraint |
caseConstraint
|
protected String |
childEntryName
|
protected ControlDefinition |
control
|
protected Control |
controlField
|
protected String |
customValidatorClass
|
protected DataType |
dataType
|
protected List<PrerequisiteConstraint> |
dependencyConstraints
|
protected Boolean |
dynamic
|
protected Boolean |
forceUppercase
|
protected String |
formatterClass
|
protected String |
lookupContextPath
|
protected LookupConstraint |
lookupDefinition
|
protected List<MustOccurConstraint> |
mustOccurConstraints
|
protected PropertyEditor |
propertyEditor
|
protected Boolean |
unique
|
protected ValidationPattern |
validationPattern
Deprecated. |
protected ValidCharactersConstraint |
validCharactersConstraint
|
Fields inherited from class org.kuali.rice.krad.datadictionary.AttributeDefinitionBase |
---|
constraintText, description, displayLabelAttribute, label, name, shortLabel, simpleConstraint, summary |
Fields inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase |
---|
id |
Constructor Summary | |
---|---|
AttributeDefinition()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
This overridden method ... |
void |
completeValidation(Class<?> rootObjectClass,
Class<?> otherObjectClass)
Deprecated. |
void |
completeValidation(Class rootObjectClass,
Class otherObjectClass,
ValidationTrace tracer)
Directly validate simple fields, call completeValidation on Definition fields. |
String |
getAdditionalDisplayAttributeName()
|
String |
getAlternateDisplayAttributeName()
|
AttributeSecurity |
getAttributeSecurity()
|
CaseConstraint |
getCaseConstraint()
|
String |
getChildEntryName()
|
ControlDefinition |
getControl()
|
Control |
getControlField()
Default Control to use when the attribute is to be rendered
for the UI. |
String |
getCustomValidatorClass()
|
DataType |
getDataType()
|
List<PrerequisiteConstraint> |
getDependencyConstraints()
Gets dependency constraints for this AttributeDefinition. |
String |
getExclusiveMin()
|
Boolean |
getForceUppercase()
Indicates whether user entry should be converted to upper case |
String |
getFormatterClass()
|
String |
getInclusiveMax()
|
String |
getLookupContextPath()
|
LookupConstraint |
getLookupDefinition()
|
Integer |
getMaxLength()
|
Integer |
getMinLength()
|
List<MustOccurConstraint> |
getMustOccurConstraints()
|
KeyValuesFinder |
getOptionsFinder()
Instance of KeyValluesFinder that should be invoked to
provide a List of values the field can have. |
List<PrerequisiteConstraint> |
getPrerequisiteConstraints()
|
PropertyEditor |
getPropertyEditor()
Performs formatting of the field value for display and then converting the value back to its expected type from a string |
Boolean |
getUnique()
|
ValidationPattern |
getValidationPattern()
Defines the allowable character-level or field-level values for an attribute |
ValidCharactersConstraint |
getValidCharactersConstraint()
|
boolean |
hasAttributeSecurity()
|
boolean |
hasFormatterClass()
|
boolean |
hasValidationPattern()
Indicates whether a validation pattern has been set |
void |
setAdditionalDisplayAttributeName(String additionalDisplayAttributeName)
|
void |
setAlternateDisplayAttributeName(String alternateDisplayAttributeName)
|
void |
setAttributeSecurity(AttributeSecurity attributeSecurity)
|
void |
setCaseConstraint(CaseConstraint caseConstraint)
|
void |
setChildEntryName(String childEntryName)
|
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 |
setControlField(Control controlField)
Setter for the default control |
void |
setCustomValidatorClass(String customValidatorClass)
|
void |
setDataType(DataType dataType)
|
void |
setDataType(String dataType)
|
void |
setDependencyConstraints(List<PrerequisiteConstraint> dependencyConstraints)
Sets dependency constraints for this AttributeDefinition. |
void |
setExclusiveMin(String exclusiveMin)
Setter for minimum value |
void |
setForceUppercase(Boolean forceUppercase)
Setter for force upper case |
void |
setFormatterClass(String formatterClass)
The formatterClass element is used when custom formatting is required for display of the field value. |
void |
setInclusiveMax(String inclusiveMax)
Setter for maximum value |
void |
setLookupContextPath(String lookupContextPath)
|
void |
setLookupDefinition(LookupConstraint lookupDefinition)
|
void |
setMaxLength(Integer maxLength)
Setter for maximum length |
void |
setMinLength(Integer minLength)
Setter for minumum length |
void |
setMustOccurConstraints(List<MustOccurConstraint> mustOccurConstraints)
|
void |
setOptionsFinder(KeyValuesFinder optionsFinder)
Setter for the field's KeyValuesFinder instance |
void |
setOptionsFinderClass(Class<? extends KeyValuesFinder> optionsFinderClass)
Setter that takes in the class name for the options finder and creates a new instance to use as the finder for the attribute field |
void |
setPrerequisiteConstraints(List<PrerequisiteConstraint> dependencyConstraints)
|
void |
setPropertyEditor(PropertyEditor propertyEditor)
Setter for the custom property editor to use for the field |
void |
setPropertyEditorClass(Class<? extends PropertyEditor> propertyEditorClass)
Convenience setter for configuring a property editor by class |
void |
setUnique(Boolean unique)
|
void |
setValidationPattern(ValidationPattern validationPattern)
The validationPattern element defines the allowable character-level or field-level values for an attribute. |
void |
setValidCharactersConstraint(ValidCharactersConstraint validCharactersConstraint)
|
String |
toString()
|
Methods inherited from class org.kuali.rice.krad.datadictionary.AttributeDefinitionBase |
---|
getConstraintText, getDescription, getDirectShortLabel, getDisplayLabelAttribute, getLabel, getName, getShortLabel, getSimpleConstraint, getSummary, isRequired, setConstraintText, setDescription, setDisplayLabelAttribute, setLabel, setName, setRequired, setShortLabel, setSimpleConstraint, setSummary |
Methods inherited from class org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase |
---|
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.validation.capability.Constrainable |
---|
getName |
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean |
---|
getComponentCode, getNamespaceCode |
Field Detail |
---|
protected Boolean forceUppercase
protected DataType dataType
protected Boolean unique
@Deprecated protected ValidationPattern validationPattern
protected ControlDefinition control
protected Control controlField
protected String formatterClass
protected PropertyEditor propertyEditor
protected AttributeSecurity attributeSecurity
protected Boolean dynamic
protected String customValidatorClass
protected ValidCharactersConstraint validCharactersConstraint
protected CaseConstraint caseConstraint
protected List<PrerequisiteConstraint> dependencyConstraints
protected List<MustOccurConstraint> mustOccurConstraints
protected LookupConstraint lookupDefinition
protected String lookupContextPath
protected String childEntryName
protected String alternateDisplayAttributeName
protected String additionalDisplayAttributeName
Constructor Detail |
---|
public AttributeDefinition()
Method Detail |
---|
public void setForceUppercase(Boolean forceUppercase)
forceUppercase
- public Boolean getForceUppercase()
If set all user input will be changed to uppercase. Values from the database will also be forced to display as upper case and thus be persisted as upper case.
public Integer getMaxLength()
LengthConstraint.getMaxLength()
public void setMaxLength(Integer maxLength)
maxLength
- public String getExclusiveMin()
RangeConstraint.getExclusiveMin()
public void setExclusiveMin(String exclusiveMin)
exclusiveMin
- - minimum allowed valuepublic String getInclusiveMax()
RangeConstraint.getInclusiveMax()
public void setInclusiveMax(String inclusiveMax)
inclusiveMax
- - max allowed valuepublic void setValidationPattern(ValidationPattern validationPattern)
public boolean hasValidationPattern()
public ValidationPattern getValidationPattern()
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.
public ControlDefinition getControl()
public void setControl(ControlDefinition control)
control
-
IllegalArgumentException
- if the given control is nullpublic boolean hasFormatterClass()
public String getFormatterClass()
getFormatterClass
in interface Formatable
public void setFormatterClass(String formatterClass)
public PropertyEditor getPropertyEditor()
Note property editors exist and are already registered for the basic Java types and the common Kuali types such as [@link KualiDecimal}. Registration with this property is only needed for custom property editors
public void setPropertyEditor(PropertyEditor propertyEditor)
propertyEditor
- public void setPropertyEditorClass(Class<? extends PropertyEditor> propertyEditorClass)
propertyEditorClass
- @Deprecated public void completeValidation(Class<?> rootObjectClass, Class<?> otherObjectClass)
completeValidation
in interface DataDictionaryDefinition
rootObjectClass
- Class of the BusinessObjectEntry which ultimately contains this definitionotherObjectClass
- other stuff required to complete validationDataDictionaryEntry.completeValidation()
public void completeValidation(Class rootObjectClass, Class otherObjectClass, ValidationTrace tracer)
DataDictionaryEntry.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)
public String toString()
toString
in class Object
Object.toString()
public AttributeSecurity getAttributeSecurity()
public void setAttributeSecurity(AttributeSecurity attributeSecurity)
attributeSecurity
- the attributeSecurity to setpublic boolean hasAttributeSecurity()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class DataDictionaryDefinitionBase
Exception
InitializingBean.afterPropertiesSet()
public Boolean getUnique()
public void setUnique(Boolean unique)
unique
- the unique to setpublic Control getControlField()
Control
to use when the attribute is to be rendered
for the UI. Used by the UIF when a control is not defined for an
InputField
public void setControlField(Control controlField)
controlField
- public Integer getMinLength()
LengthConstraint.getMinLength()
public void setMinLength(Integer minLength)
minLength
- public DataType getDataType()
public void setDataType(DataType dataType)
dataType
- the dataType to setpublic void setDataType(String dataType)
public String getCustomValidatorClass()
public void setCustomValidatorClass(String customValidatorClass)
customValidatorClass
- the customValidatorClass to setpublic ValidCharactersConstraint getValidCharactersConstraint()
getValidCharactersConstraint
in interface ValidCharactersConstrainable
public void setValidCharactersConstraint(ValidCharactersConstraint validCharactersConstraint)
validCharactersConstraint
- the validChars to setpublic CaseConstraint getCaseConstraint()
getCaseConstraint
in interface CaseConstrainable
public void setCaseConstraint(CaseConstraint caseConstraint)
caseConstraint
- the caseConstraint to setpublic List<PrerequisiteConstraint> getPrerequisiteConstraints()
getPrerequisiteConstraints
in interface PrerequisiteConstrainable
public void setPrerequisiteConstraints(List<PrerequisiteConstraint> dependencyConstraints)
dependencyConstraints
- the requireConstraint to setpublic List<MustOccurConstraint> getMustOccurConstraints()
getMustOccurConstraints
in interface MustOccurConstrainable
public void setMustOccurConstraints(List<MustOccurConstraint> mustOccurConstraints)
mustOccurConstraints
- the occursConstraint to setpublic LookupConstraint getLookupDefinition()
public void setLookupDefinition(LookupConstraint lookupDefinition)
lookupDefinition
- the lookupDefinition to setpublic String getLookupContextPath()
public void setLookupContextPath(String lookupContextPath)
lookupContextPath
- the lookupContextPath to setpublic String getChildEntryName()
getChildEntryName
in interface HierarchicallyConstrainable
public void setChildEntryName(String childEntryName)
childEntryName
- the childEntryName to setpublic KeyValuesFinder getOptionsFinder()
KeyValluesFinder
that should be invoked to
provide a List of values the field can have. Generally used to provide
the options for a multi-value control or to validate the submitted field
value
public void setOptionsFinder(KeyValuesFinder optionsFinder)
optionsFinder
- public void setOptionsFinderClass(Class<? extends KeyValuesFinder> optionsFinderClass)
optionsFinderClass
- public void setAdditionalDisplayAttributeName(String additionalDisplayAttributeName)
public String getAdditionalDisplayAttributeName()
public void setAlternateDisplayAttributeName(String alternateDisplayAttributeName)
public String getAlternateDisplayAttributeName()
public List<PrerequisiteConstraint> getDependencyConstraints()
public void setDependencyConstraints(List<PrerequisiteConstraint> dependencyConstraints)
dependencyConstraints
- dependency constraints
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |