public class AttributeDefinition extends AttributeDefinitionBase implements CaseConstrainable, PrerequisiteConstrainable, Formatable, HierarchicallyConstrainable, MustOccurConstrainable, ValidCharactersConstrainable
Modifier and Type | Field and Description |
---|---|
protected String |
additionalDisplayAttributeName |
protected String |
alternateDisplayAttributeName |
protected AttributeSecurity |
attributeSecurity |
protected Control |
cachedDerivedControl |
protected CaseConstraint |
caseConstraint |
protected String |
childEntryName |
protected ControlDefinition |
control
Deprecated.
|
protected Control |
controlField |
protected String |
customValidatorClass |
protected List<PrerequisiteConstraint> |
dependencyConstraints |
protected Boolean |
dynamic |
protected Boolean |
forceUppercase |
protected String |
formatterClass
Deprecated.
|
protected List<MustOccurConstraint> |
mustOccurConstraints |
protected PropertyEditor |
propertyEditor |
protected Boolean |
unique |
protected ValidationPattern |
validationPattern
Deprecated.
|
protected ValidCharactersConstraint |
validCharactersConstraint |
constraintText, dataObjectAttribute, description, displayLabelAttribute, label, name, shortLabel, simpleConstraint, summary
embeddedDataObjectMetadata, generatedFromMetadata, id
componentCode, namespaceCode
Constructor and Description |
---|
AttributeDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
completeValidation(Class<?> rootObjectClass,
Class<?> otherObjectClass)
Deprecated.
|
void |
completeValidation(Class rootObjectClass,
Class otherObjectClass,
ValidationTrace tracer)
Directly validate simple fields, call completeValidation on Definition
fields.
|
void |
dataDictionaryPostProcessing()
This overridden method ...
|
String |
getAdditionalDisplayAttributeName() |
String |
getAlternateDisplayAttributeName() |
AttributeSecurity |
getAttributeSecurity() |
CaseConstraint |
getCaseConstraint() |
String |
getChildEntryName() |
ControlDefinition |
getControl()
Deprecated.
|
Control |
getControlField()
Default
Control to use when the attribute is to be rendered
for the UI. |
String |
getCustomValidatorClass() |
DataType |
getDataType()
Returns the Kuali datatype for this field.
|
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()
Deprecated.
|
String |
getInclusiveMax() |
Integer |
getMaxLength()
Returns the maximum length for this field, if set.
|
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()
Deprecated.
|
ValidCharactersConstraint |
getValidCharactersConstraint() |
boolean |
hasAttributeSecurity() |
boolean |
hasFormatterClass()
Deprecated.
|
boolean |
hasValidationPattern()
Deprecated.
|
void |
setAdditionalDisplayAttributeName(String additionalDisplayAttributeName) |
void |
setAlternateDisplayAttributeName(String alternateDisplayAttributeName) |
void |
setAttributeSecurity(AttributeSecurity attributeSecurity) |
void |
setCaseConstraint(CaseConstraint caseConstraint) |
void |
setChildEntryName(String childEntryName) |
void |
setControl(ControlDefinition control)
Deprecated.
|
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)
Deprecated.
|
void |
setInclusiveMax(String inclusiveMax)
Setter for maximum value
|
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)
Deprecated.
|
void |
setValidCharactersConstraint(ValidCharactersConstraint validCharactersConstraint) |
getConstraintText, getDataObjectAttribute, getDescription, getDirectShortLabel, getDisplayLabelAttribute, getLabel, getName, getShortLabel, getSimpleConstraint, getSummary, isRequired, setConstraintText, setDataObjectAttribute, setDescription, setDisplayLabelAttribute, setLabel, setName, setRequired, setShortLabel, setSimpleConstraint, setSummary
getId, hasEmbeddedDataObjectMetadata, setEmbeddedDataObjectMetadata, setGeneratedFromMetadata, setId, wasGeneratedFromMetadata
clone, copy, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
getComponentCode, getNamespaceCode
protected Boolean forceUppercase
@Deprecated protected ValidationPattern validationPattern
@Deprecated protected ControlDefinition control
protected Control controlField
protected Control cachedDerivedControl
@Deprecated protected String formatterClass
protected PropertyEditor propertyEditor
protected AttributeSecurity attributeSecurity
protected String customValidatorClass
protected ValidCharactersConstraint validCharactersConstraint
protected CaseConstraint caseConstraint
protected List<PrerequisiteConstraint> dependencyConstraints
protected List<MustOccurConstraint> mustOccurConstraints
protected String childEntryName
protected String alternateDisplayAttributeName
protected String additionalDisplayAttributeName
public AttributeDefinition()
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.
If not set and embedded metadata is present, the ForceUppercase value will be read from the linked metadata.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 value@Deprecated public void setValidationPattern(ValidationPattern validationPattern)
@Deprecated public boolean hasValidationPattern()
@Deprecated 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.
@Deprecated public ControlDefinition getControl()
@Deprecated public void setControl(ControlDefinition control)
control
- IllegalArgumentException
- if the given control is null@Deprecated public boolean hasFormatterClass()
@Deprecated public String getFormatterClass()
getFormatterClass
in interface Formatable
@Deprecated 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
- public void dataDictionaryPostProcessing()
dataDictionaryPostProcessing
in interface DictionaryBean
dataDictionaryPostProcessing
in class DictionaryBeanBase
DictionaryBeanBase.dataDictionaryPostProcessing()
@Deprecated public void completeValidation(Class<?> rootObjectClass, Class<?> otherObjectClass)
completeValidation
in interface DataDictionaryDefinition
completeValidation
in class DataDictionaryDefinitionBase
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)
completeValidation
in interface DataDictionaryDefinition
completeValidation
in class DataDictionaryDefinitionBase
rootObjectClass
- Class of the BusinessObjectEntry which ultimately contains this definitionotherObjectClass
- other stuff required to complete validationtracer
- ValidationTrace
class used to track what was being validated at the time of any problems discoveredDataDictionaryEntry.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)
public AttributeSecurity getAttributeSecurity()
public void setAttributeSecurity(AttributeSecurity attributeSecurity)
public boolean hasAttributeSecurity()
public 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
If not set in the AttributeDefinition, a default will be generated from the metadata for this field.public void setControlField(Control controlField)
controlField
- public Integer getMinLength()
LengthConstraint.getMinLength()
public void setMinLength(Integer minLength)
minLength
- public DataType getDataType()
DataType
for the defined types.
If not defined in the AttributeDefinition, it will be retrieved from the embedded metadata, if defined.
If not defined by either, will return DataType.STRING
.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 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
valuepublic 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 constraintsCopyright © 2005–2016 The Kuali Foundation. All rights reserved.