Package org.alfresco.repo.forms
Class FieldDefinition
java.lang.Object
org.alfresco.repo.forms.FieldDefinition
- Direct Known Subclasses:
AssociationFieldDefinition,PropertyFieldDefinition
Abstract representation of a field defintion.
- Author:
- Gavin Cornwell
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the binding for the field, this is used by some FormModelProcessor implementations to generate an alternative representation of the dataReturns the name of the key being used to hold the data for the fieldReturns any default value the field may haveReturns the description of the fieldgetGroup()Returns the group the field may be a part ofgetLabel()Returns the display label for the fieldgetName()Returns the name of the fieldbooleanDetermines whether the field is protected i.e. it should be rendered as read-only in any client displaying the fieldvoidsetBinding(String binding) Sets the binding to use for the field, this is used by some FormModelProcessor implementations to generate an alternative representation of the datavoidsetDataKeyName(String dataKeyName) Sets the name of the key to be used to hold the data for the fieldvoidsetDefaultValue(String defaultValue) Sets the default value for the fieldvoidsetDescription(String description) Sets the description of the fieldvoidsetGroup(FieldGroup group) Sets the group the field is part ofvoidSets the display label for the fieldvoidsetProtectedField(boolean protectedField) Sets whether the field is protected i.e. it should be rendered as read-only in any client displaying the field
-
Field Details
-
name
-
label
-
description
-
binding
-
defaultValue
-
dataKeyName
-
group
-
protectedField
protected boolean protectedField
-
-
Constructor Details
-
FieldDefinition
Default constructor
-
-
Method Details
-
getName
Returns the name of the field- Returns:
- The field's name
-
getLabel
Returns the display label for the field- Returns:
- The field's display label
-
setLabel
Sets the display label for the field- Parameters:
label- The field's display label
-
getDescription
Returns the description of the field- Returns:
- The field's description
-
setDescription
Sets the description of the field- Parameters:
description- The field's description
-
getBinding
Returns the binding for the field, this is used by some FormModelProcessor implementations to generate an alternative representation of the data- Returns:
- The field's binding
-
setBinding
Sets the binding to use for the field, this is used by some FormModelProcessor implementations to generate an alternative representation of the data- Parameters:
binding- The field's binding
-
getDefaultValue
Returns any default value the field may have- Returns:
- The field's default value or null if there isn't one
-
setDefaultValue
Sets the default value for the field- Parameters:
defaultValue- The field's default value
-
getDataKeyName
Returns the name of the key being used to hold the data for the field- Returns:
- Name of the key being used to hold the data for the field
-
setDataKeyName
Sets the name of the key to be used to hold the data for the field- Parameters:
dataKeyName- The name of the key to be used to hold the data for the field
-
getGroup
Returns the group the field may be a part of- Returns:
- The field's group or null if it does not belong to a group
-
setGroup
Sets the group the field is part of- Parameters:
group- The group the field belongs to
-
isProtectedField
public boolean isProtectedField()Determines whether the field is protected i.e. it should be rendered as read-only in any client displaying the field- Returns:
- true if the field is protected
-
setProtectedField
public void setProtectedField(boolean protectedField) Sets whether the field is protected i.e. it should be rendered as read-only in any client displaying the field- Parameters:
protectedField- true if the field is protected
-