FormService checkpoint - Configurable, extendable form processor mechanism introduced, default handler for building repo node based forms implemented and the unit test actually tests stuff now!

This is just the Java service API, there is no script or REST API yet.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12342 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2008-12-10 13:06:38 +00:00
parent d24b54b4e6
commit c159cdbe90
20 changed files with 2003 additions and 263 deletions

View File

@@ -39,6 +39,14 @@ public abstract class FieldDefinition
protected FieldGroup group;
protected boolean protectedField;
/**
* Default constructor
*/
public FieldDefinition(String name)
{
this.name = name;
}
/**
* Returns the name of the field
*
@@ -59,6 +67,16 @@ public abstract class FieldDefinition
return this.label;
}
/**
* Sets the display label for the field
*
* @param label The field's display label
*/
public void setLabel(String label)
{
this.label = label;
}
/**
* Returns the description of the field
*
@@ -69,6 +87,16 @@ public abstract class FieldDefinition
return this.description;
}
/**
* Sets the description of the field
*
* @param description The field's description
*/
public void setDescription(String description)
{
this.description = description;
}
/**
* Returns the binding for the field, this is used by some
* FormModelProcessor implementations to generate an
@@ -81,6 +109,18 @@ public abstract class FieldDefinition
return this.binding;
}
/**
* Sets the binding to use for the field, this is used by some
* FormModelProcessor implementations to generate an
* alternative representation of the data
*
* @param binding The field's binding
*/
public void setBinding(String binding)
{
this.binding = binding;
}
/**
* Returns any default value the field may have
*
@@ -91,6 +131,16 @@ public abstract class FieldDefinition
return this.defaultValue;
}
/**
* Sets the default value for the field
*
* @param defaultValue The field's default value
*/
public void setDefaultValue(String defaultValue)
{
this.defaultValue = defaultValue;
}
/**
* Returns the group the field may be a part of
*
@@ -101,6 +151,16 @@ public abstract class FieldDefinition
return this.group;
}
/**
* Sets the group the field is part of
*
* @param group The group the field belongs to
*/
public void setGroup(FieldGroup group)
{
this.group = group;
}
/**
* Determines whether the field is protected i.e. it should be rendered
* as read-only in any client displaying the field
@@ -111,4 +171,15 @@ public abstract class FieldDefinition
{
return this.protectedField;
}
/**
* Sets whether the field is protected i.e. it should be rendered
* as read-only in any client displaying the field
*
* @param protectedField true if the field is protected
*/
public void setProtectedField(boolean protectedField)
{
this.protectedField = protectedField;
}
}