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 java.lang.ObjectAbstract representation of a field defintion.- Author:
- Gavin Cornwell
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringbindingprotected java.lang.StringdataKeyNameprotected java.lang.StringdefaultValueprotected java.lang.Stringdescriptionprotected FieldGroupgroupprotected java.lang.Stringlabelprotected java.lang.Stringnameprotected booleanprotectedField
-
Constructor Summary
Constructors Constructor Description FieldDefinition(java.lang.String name)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBinding()Returns the binding for the field, this is used by some FormModelProcessor implementations to generate an alternative representation of the datajava.lang.StringgetDataKeyName()Returns the name of the key being used to hold the data for the fieldjava.lang.StringgetDefaultValue()Returns any default value the field may havejava.lang.StringgetDescription()Returns the description of the fieldFieldGroupgetGroup()Returns the group the field may be a part ofjava.lang.StringgetLabel()Returns the display label for the fieldjava.lang.StringgetName()Returns the name of the fieldbooleanisProtectedField()Determines whether the field is protected i.e.voidsetBinding(java.lang.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(java.lang.String dataKeyName)Sets the name of the key to be used to hold the data for the fieldvoidsetDefaultValue(java.lang.String defaultValue)Sets the default value for the fieldvoidsetDescription(java.lang.String description)Sets the description of the fieldvoidsetGroup(FieldGroup group)Sets the group the field is part ofvoidsetLabel(java.lang.String label)Sets the display label for the fieldvoidsetProtectedField(boolean protectedField)Sets whether the field is protected i.e.
-
-
-
Field Detail
-
name
protected java.lang.String name
-
label
protected java.lang.String label
-
description
protected java.lang.String description
-
binding
protected java.lang.String binding
-
defaultValue
protected java.lang.String defaultValue
-
dataKeyName
protected java.lang.String dataKeyName
-
group
protected FieldGroup group
-
protectedField
protected boolean protectedField
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the field- Returns:
- The field's name
-
getLabel
public java.lang.String getLabel()
Returns the display label for the field- Returns:
- The field's display label
-
setLabel
public void setLabel(java.lang.String label)
Sets the display label for the field- Parameters:
label- The field's display label
-
getDescription
public java.lang.String getDescription()
Returns the description of the field- Returns:
- The field's description
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of the field- Parameters:
description- The field's description
-
getBinding
public java.lang.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(java.lang.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 java.lang.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(java.lang.String defaultValue)
Sets the default value for the field- Parameters:
defaultValue- The field's default value
-
getDataKeyName
public java.lang.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(java.lang.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
-
-