org.alfresco.repo.forms
Class FieldDefinition

java.lang.Object
  extended by org.alfresco.repo.forms.FieldDefinition
Direct Known Subclasses:
AssociationFieldDefinition, PropertyFieldDefinition

public abstract class FieldDefinition
extends java.lang.Object

Abstract representation of a field defintion.


Field Summary
protected  java.lang.String binding
           
protected  java.lang.String dataKeyName
           
protected  java.lang.String defaultValue
           
protected  java.lang.String description
           
protected  FieldGroup group
           
protected  java.lang.String label
           
protected  java.lang.String name
           
protected  boolean protectedField
           
 
Constructor Summary
FieldDefinition(java.lang.String name)
          Default constructor
 
Method Summary
 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
 java.lang.String getDataKeyName()
          Returns the name of the key being used to hold the data for the field
 java.lang.String getDefaultValue()
          Returns any default value the field may have
 java.lang.String getDescription()
          Returns the description of the field
 FieldGroup getGroup()
          Returns the group the field may be a part of
 java.lang.String getLabel()
          Returns the display label for the field
 java.lang.String getName()
          Returns the name of the field
 boolean isProtectedField()
          Determines whether the field is protected i.e.
 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
 void setDataKeyName(java.lang.String dataKeyName)
          Sets the name of the key to be used to hold the data for the field
 void setDefaultValue(java.lang.String defaultValue)
          Sets the default value for the field
 void setDescription(java.lang.String description)
          Sets the description of the field
 void setGroup(FieldGroup group)
          Sets the group the field is part of
 void setLabel(java.lang.String label)
          Sets the display label for the field
 void setProtectedField(boolean protectedField)
          Sets whether the field is protected i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

FieldDefinition

public FieldDefinition(java.lang.String name)
Default constructor

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


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.