public interface BeanElement
BeanDefinition
,
Developer Guide for constraintsModifier and Type | Method and Description |
---|---|
BeanFacet |
addFacetConstraint(Class<? extends Constraint<?>> aConstraintClass)
Adds a programmatic constraint to this element.
|
BeanFacetDatasetSet |
addFacetDatasetSet(AdaptationHome aDataspace)
Adds a dataset constraint to this element.
|
BeanFacetDatasetSet |
addFacetDatasetSet(Path aPath)
Adds a dataset constraint to this element.
|
BeanFacetDataspaceSet |
addFacetDataspaceSet()
Adds a dataspace constraint to this element.
|
BeanFacet |
addFacetEnumeration(Nomenclature<?> aNomenclature)
Sets a nomenclature for this element.
|
BeanFacet |
addFacetFractionDigits(int aValue)
Sets the number of fraction digits for decimal types.
|
BeanFacet |
addFacetLength(int aValue)
Sets the exact number of characters required for this element.
|
BeanFacet |
addFacetMax(Object aBoundaryValue,
boolean isBoundaryExcluded)
Sets the maximum value for an element.
|
BeanFacet |
addFacetMaxLength(int aValue)
Sets the maximum number of characters required for this element.
|
BeanFacet |
addFacetMin(Object aBoundaryValue,
boolean isBoundaryExcluded)
Sets the minimum value for an element.
|
BeanFacet |
addFacetMinLength(int aValue)
Sets the minimum number of characters required for this element.
|
BeanFacet |
addFacetPattern(String aPattern)
Sets a pattern that the value of the field must match.
|
BeanFacetTableRef |
addFacetTableRef(AdaptationReference aDataset,
Path aTablePath)
Adds a table reference constraint to this element in the current dataspace or snapshot.
|
BeanFacetTableRef |
addFacetTableRef(AdaptationTable aTable)
Adds a table reference constraint to this element.
|
BeanFacet |
addFacetTotalDigits(int aValue)
Sets the maximum number of digits for integer or decimal types.
|
void |
setDefaultCollapseMode(boolean isCollpased)
Sets the default collapsed mode.
|
void |
setDefaultValue(Object aDefaultValue)
Sets the default value.
|
void |
setDescription(String aDescription)
Sets the description for this element.
|
void |
setDescription(UserMessage aDescription)
Sets the localized description for this element.
|
void |
setLabel(String aLabel)
Sets the label for this element.
|
void |
setLabel(UserMessage aLabel)
Sets the localized label for this element.
|
void |
setMaxOccurs(int maxOccurs)
Sets the maximum number of occurrences for this element.
|
void |
setMaxOccursAsUnbounded()
Removes the maximum number of occurrences for this element.
|
void |
setMinOccurs(int minOccurs)
Sets the minimum number of occurrences for this element.
|
void |
setMinOccursErrorMessage(String anErrorMessage)
Sets the error message to display when the minimum number of occurrences check failed.
|
void |
setMinOccursErrorMessage(UserMessage anErrorMessage)
Sets the localized error message to display when the minimum number of occurrences
check failed.
|
void |
setUIBean(Class<? extends UIBeanEditor> aUIBeanClass)
Deprecated.
|
void |
setWidget(Class<? extends UIWidgetFactory<?>> aWidgetFactoryClass)
Sets the widget for this element.
|
void setDefaultValue(Object aDefaultValue)
aDefaultValue
- the default value. It must be compatible with the element's type.void setLabel(String aLabel)
aLabel
- the label for this element.void setLabel(UserMessage aLabel)
aLabel
- the label for this element.void setDescription(String aDescription)
aDescription
- the description for this element.void setDescription(UserMessage aDescription)
aDescription
- the description for this element.void setMinOccurs(int minOccurs)
0
.minOccurs
- the minimum number of occurrences for this element.void setMinOccursErrorMessage(String anErrorMessage)
anErrorMessage
- the error message.void setMinOccursErrorMessage(UserMessage anErrorMessage)
anErrorMessage
- the error message.void setMaxOccurs(int maxOccurs)
1
.maxOccurs
- the maximum number of occurrences for this element.void setMaxOccursAsUnbounded()
BeanFacet addFacetLength(int aValue)
aValue
- the exact number of characters for this element.BeanFacet addFacetMinLength(int aValue)
aValue
- the minimum number of characters for this element.BeanFacet addFacetMaxLength(int aValue)
aValue
- the maximum number of characters for this element.BeanFacet addFacetMin(Object aBoundaryValue, boolean isBoundaryExcluded)
aBoundaryValue
- the maximum value. It must be compatible with the element's type.isBoundaryExcluded
- must be true
if @aBoundaryValue
if not a valid value.BeanFacet addFacetMax(Object aBoundaryValue, boolean isBoundaryExcluded)
aBoundaryValue
- the maximum value. It must be compatible with the element's type.isBoundaryExcluded
- must be true
if @aBoundaryValue
if not a valid value.BeanFacet addFacetTotalDigits(int aValue)
aValue
- the maximum number of digits.BeanFacet addFacetFractionDigits(int aValue)
aValue
- the maximum number of digits.BeanFacet addFacetPattern(String aPattern)
aPattern
- the regular expression pattern.BeanFacet addFacetConstraint(Class<? extends Constraint<?>> aConstraintClass)
aConstraintClass
- the constraint class to add to this element. The class must extend
Constraint
or ConstraintEnumeration.BeanFacetTableRef addFacetTableRef(AdaptationTable aTable)
aTable
- table that is referenced by this element.IllegalArgumentException
- if the table is in a snapshot.addFacetTableRef(AdaptationReference, Path)
BeanFacetTableRef addFacetTableRef(AdaptationReference aDataset, Path aTablePath)
aDataset
- dataset that is referenced by this element.aTablePath
- path of the table that is referenced by this element.BeanFacet addFacetEnumeration(Nomenclature<?> aNomenclature)
One may consider using instead a enumeration constraint.
aNomenclature
- A collection of possible values.ConstraintEnumeration
,
addFacetConstraint(Class)
BeanFacetDataspaceSet addFacetDataspaceSet()
BeanFacetDatasetSet addFacetDatasetSet(AdaptationHome aDataspace)
aDataspace
- a dataspace. Can be a branch or a snapshot.BeanFacetDatasetSet addFacetDatasetSet(Path aPath)
aPath
- a path to the value that holds the dataspace key. The path must be
relative and is resolved against the current node.void setDefaultCollapseMode(boolean isCollpased)
false
.isCollpased
- if true
, the group will be collapsed by default.
If false
, the group will be expanded by default.@Deprecated void setUIBean(Class<? extends UIBeanEditor> aUIBeanClass)
This method allows to reuse existing UI beans but is deprecated because one should consider the porting of UI beans to the new custom widget API.
aUIBeanClass
- the JavaBean class for the UI bean. This class must extend the class
UIBeanEditor.void setWidget(Class<? extends UIWidgetFactory<?>> aWidgetFactoryClass)
aWidgetFactoryClass
- the Java bean class for the widget. This class must implement the interface
UIWidgetFactory.