Package org.alfresco.repo.forms
Class PropertyFieldDefinition
java.lang.Object
org.alfresco.repo.forms.FieldDefinition
org.alfresco.repo.forms.PropertyFieldDefinition
A property field definition.
- Author:
- Gavin Cornwell
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a constraint on a property field -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<PropertyFieldDefinition.FieldConstraint>protected Stringprotected DataTypeParametersprotected IndexTokenisationModeprotected booleanprotected booleanFields inherited from class org.alfresco.repo.forms.FieldDefinition
binding, dataKeyName, defaultValue, description, group, label, name, protectedField -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of constraints the property may haveReturns the dataType for the property, this is a value from the Alfresco data dictionary i.e. d:text, d:int etc.Returns the data type parameters for the fieldReturns a IndexTokenisationMode the propertybooleanDetermines if the property is mandatorybooleanDetermines if the property can contain multiple valuesvoidsetConstraints(List<PropertyFieldDefinition.FieldConstraint> constraints) Sets the list of FieldConstraint objects for the propertyvoidsetDataTypeParameters(DataTypeParameters dataTypeParams) Sets the data type parameters for the fieldvoidsetIndexTokenisationMode(IndexTokenisationMode indexTokenisationMode) Sets the IndexTokenisationMode objects for the propertyvoidsetMandatory(boolean mandatory) Sets whether the property is mandatoryvoidsetRepeating(boolean repeats) Sets whether the property can contain multiple valuestoString()Methods inherited from class org.alfresco.repo.forms.FieldDefinition
getBinding, getDataKeyName, getDefaultValue, getDescription, getGroup, getLabel, getName, isProtectedField, setBinding, setDataKeyName, setDefaultValue, setDescription, setGroup, setLabel, setProtectedField
-
Field Details
-
dataType
-
dataTypeParams
-
mandatory
protected boolean mandatory -
repeats
protected boolean repeats -
indexTokenisationMode
-
constraints
-
-
Constructor Details
-
PropertyFieldDefinition
Default constructor- Parameters:
name- The name of the propertydataType- The data type of the property
-
-
Method Details
-
getDataType
Returns the dataType for the property, this is a value from the Alfresco data dictionary i.e. d:text, d:int etc.- Returns:
- The field's data type
-
getDataTypeParameters
Returns the data type parameters for the field- Returns:
- DataTypeParameters object or null
-
setDataTypeParameters
Sets the data type parameters for the field- Parameters:
dataTypeParams- The DataTypeParameters for the field
-
isMandatory
public boolean isMandatory()Determines if the property is mandatory- Returns:
- true if the field is mandatory
-
setMandatory
public void setMandatory(boolean mandatory) Sets whether the property is mandatory- Parameters:
mandatory- true if it is mandatory
-
isRepeating
public boolean isRepeating()Determines if the property can contain multiple values- Returns:
- true if the field can contain multiple values
-
setRepeating
public void setRepeating(boolean repeats) Sets whether the property can contain multiple values- Parameters:
repeats- true if the field can contain multiple values
-
getConstraints
Returns a list of constraints the property may have- Returns:
- List of FieldContstraint objects or null if there are no constraints for the field
-
setConstraints
Sets the list of FieldConstraint objects for the property- Parameters:
constraints- List of FieldConstraint objects
-
getIndexTokenisationMode
Returns a IndexTokenisationMode the property- Returns:
- IndexTokenisationMode objects or null
-
setIndexTokenisationMode
Sets the IndexTokenisationMode objects for the property- Parameters:
indexTokenisationMode- objects
-
toString
-