Package org.alfresco.repo.forms
Class FieldDefinition
- java.lang.Object
-
- org.alfresco.repo.forms.FieldDefinition
-
- Direct Known Subclasses:
AssociationFieldDefinition,PropertyFieldDefinition
public abstract class FieldDefinition extends Object
Abstract representation of a field defintion.- Author:
- Gavin Cornwell
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringbindingprotected StringdataKeyNameprotected StringdefaultValueprotected Stringdescriptionprotected FieldGroupgroupprotected Stringlabelprotected Stringnameprotected booleanprotectedField
-
Constructor Summary
Constructors Constructor Description FieldDefinition(String name)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBinding()Returns the binding for the field, this is used by some FormModelProcessor implementations to generate an alternative representation of the dataStringgetDataKeyName()Returns the name of the key being used to hold the data for the fieldStringgetDefaultValue()Returns any default value the field may haveStringgetDescription()Returns the description of the fieldFieldGroupgetGroup()Returns the group the field may be a part ofStringgetLabel()Returns the display label for the fieldStringgetName()Returns the name of the fieldbooleanisProtectedField()Determines whether the field is protected i.e.voidsetBinding(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 ofvoidsetLabel(String label)Sets the display label for the fieldvoidsetProtectedField(boolean protectedField)Sets whether the field is protected i.e.
-
-
-
Field Detail
-
name
protected String name
-
label
protected String label
-
description
protected String description
-
binding
protected String binding
-
defaultValue
protected String defaultValue
-
dataKeyName
protected String dataKeyName
-
group
protected FieldGroup group
-
protectedField
protected boolean protectedField
-
-
Constructor Detail
-
FieldDefinition
public FieldDefinition(String name)
Default constructor
-
-
Method Detail
-
getName
public String getName()
Returns the name of the field- Returns:
- The field's name
-
getLabel
public String getLabel()
Returns the display label for the field- Returns:
- The field's display label
-
setLabel
public void setLabel(String label)
Sets the display label for the field- Parameters:
label- The field's display label
-
getDescription
public String getDescription()
Returns the description of the field- Returns:
- The field's description
-
setDescription
public void setDescription(String description)
Sets the description of the field- Parameters:
description- The field's description
-
getBinding
public String 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
public void setBinding(String binding)
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
public String getDefaultValue()
Returns any default value the field may have- Returns:
- The field's default value or null if there isn't one
-
setDefaultValue
public void setDefaultValue(String defaultValue)
Sets the default value for the field- Parameters:
defaultValue- The field's default value
-
getDataKeyName
public String 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
public void setDataKeyName(String dataKeyName)
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
public FieldGroup 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
public void setGroup(FieldGroup group)
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
-
-