public class FormUIGet
extends org.springframework.extensions.webscripts.DeclarativeWebScript
| Modifier and Type | Class and Description |
|---|---|
class |
FormUIGet.Constraint
Represents a field constraint.
|
class |
FormUIGet.Element
Base inner class to represent form elements i.e a field or set
NOTE: This class has to be public for the template engine to
access the object correctly.
|
class |
FormUIGet.Field
Represents a field on a form.
|
class |
FormUIGet.FieldControl
Represents the control used by a form field.
|
class |
FormUIGet.FieldPointer
Represents a pointer to a field, used in the form UI model.
|
protected class |
FormUIGet.MessageHelper
Helper class used to retrieve localized messages.
|
protected class |
FormUIGet.ModelContext
Inner class used to hold all the context required to generate the model
and the model itself.
|
class |
FormUIGet.Set
Represents a set of fields and/or nested sets.
|
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ALFRESCO_PROXY |
protected static java.lang.String |
ASSOC_PREFIX |
protected static java.lang.String |
ASSOCIATION |
protected static java.lang.String |
CM_NAME_PROP |
protected static java.lang.String |
CONFIG_FORMS |
protected org.springframework.extensions.config.ConfigService |
configService |
protected static java.lang.String |
CONSTRAINT_LENGTH |
protected static java.lang.String |
CONSTRAINT_LIST |
protected static java.lang.String |
CONSTRAINT_MANDATORY |
protected static java.lang.String |
CONSTRAINT_MINMAX |
protected static java.lang.String |
CONSTRAINT_MSG_LENGTH |
protected static java.lang.String |
CONSTRAINT_MSG_MINMAX |
protected static java.lang.String |
CONSTRAINT_MSG_NUMBER |
protected static java.lang.String |
CONSTRAINT_NODE_HANDLER |
protected static java.lang.String |
CONSTRAINT_NUMBER |
protected static java.lang.String |
CONSTRAINT_REGEX |
protected static java.lang.String |
CONTROL_PARAM_OPTION_SEPARATOR |
protected static java.lang.String |
CONTROL_PARAM_OPTIONS |
protected static java.lang.String |
CONTROL_SELECT_MANY |
protected static java.lang.String |
CONTROL_SELECT_ONE |
protected static java.lang.String |
DEFAULT_CONSTRAINT_EVENT |
protected static java.lang.String |
DEFAULT_FIELD_TYPE |
protected static java.lang.String |
DEFAULT_METHOD |
protected static java.lang.String |
DEFAULT_MODE |
protected static java.lang.String |
DEFAULT_SUBMIT_TYPE |
protected static java.lang.String |
DELIMITER |
protected static java.lang.String |
ENCTYPE_JSON |
protected static java.lang.String |
ENCTYPE_MULTIPART |
protected static java.lang.String |
ENCTYPE_URL |
protected static java.lang.String |
ENDPOINT_ID |
protected static java.lang.String |
FIELD |
protected static java.lang.String |
INDENT |
protected static java.lang.String |
MODEL_ARGUMENTS |
protected static java.lang.String |
MODEL_CAPABILITIES |
protected static java.lang.String |
MODEL_CONSTRAINTS |
protected static java.lang.String |
MODEL_CREATE_TEMPLATE |
protected static java.lang.String |
MODEL_DATA |
protected static java.lang.String |
MODEL_DATA_KEY_NAME |
protected static java.lang.String |
MODEL_DATA_TYPE |
protected static java.lang.String |
MODEL_DATA_TYPE_PARAMETERS |
protected static java.lang.String |
MODEL_DEFAULT_VALUE |
protected static java.lang.String |
MODEL_DEFINITION |
protected static java.lang.String |
MODEL_DESCRIPTION |
protected static java.lang.String |
MODEL_DESTINATION |
protected static java.lang.String |
MODEL_EDIT_TEMPLATE |
protected static java.lang.String |
MODEL_ENCTYPE |
protected static java.lang.String |
MODEL_ENDPOINT_DIRECTION |
protected static java.lang.String |
MODEL_ENDPOINT_MANDATORY |
protected static java.lang.String |
MODEL_ENDPOINT_MANY |
protected static java.lang.String |
MODEL_ENDPOINT_TYPE |
protected static java.lang.String |
MODEL_ERROR |
protected static java.lang.String |
MODEL_FIELDS |
protected static java.lang.String |
MODEL_FORCE |
protected static java.lang.String |
MODEL_FORM |
protected static java.lang.String |
MODEL_FORM_DATA |
protected static java.lang.String |
MODEL_GROUP |
protected static java.lang.String |
MODEL_JAVASCRIPT |
protected static java.lang.String |
MODEL_LABEL |
protected static java.lang.String |
MODEL_MANDATORY |
protected static java.lang.String |
MODEL_MAX_LENGTH |
protected static java.lang.String |
MODEL_MESSAGE |
protected static java.lang.String |
MODEL_METHOD |
protected static java.lang.String |
MODEL_MODE |
protected static java.lang.String |
MODEL_NAME |
protected static java.lang.String |
MODEL_PARAMETERS |
protected static java.lang.String |
MODEL_PROTECTED_FIELD |
protected static java.lang.String |
MODEL_REDIRECT |
protected static java.lang.String |
MODEL_REPEATING |
protected static java.lang.String |
MODEL_SHOW_CANCEL_BUTTON |
protected static java.lang.String |
MODEL_SHOW_CAPTION |
protected static java.lang.String |
MODEL_SHOW_RESET_BUTTON |
protected static java.lang.String |
MODEL_SHOW_SUBMIT_BUTTON |
protected static java.lang.String |
MODEL_STRUCTURE |
protected static java.lang.String |
MODEL_SUBMISSION_URL |
protected static java.lang.String |
MODEL_TYPE |
protected static java.lang.String |
MODEL_VIEW_TEMPLATE |
protected static java.lang.String |
MSG_DEFAULT_SET_LABEL |
protected static java.lang.String |
OLD_DATA_TYPE_PREFIX |
protected static java.lang.String |
PARAM_FORM_ID |
protected static java.lang.String |
PARAM_ITEM_ID |
protected static java.lang.String |
PARAM_ITEM_KIND |
protected static java.lang.String |
PARAM_JS |
protected static java.lang.String |
PARAM_SUBMISSION_URL |
protected static java.lang.String |
PARAM_SUBMIT_TYPE |
protected static java.lang.String |
PROP_PREFIX |
protected static java.lang.String |
PROPERTY |
protected static java.lang.String |
SET |
protected static java.lang.String |
SUBMIT_TYPE_JSON |
protected static java.lang.String |
SUBMIT_TYPE_MULTIPART |
protected static java.lang.String |
SUBMIT_TYPE_URL |
| Constructor and Description |
|---|
FormUIGet() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map |
discoverArguments(FormUIGet.ModelContext context)
Determines the "arguments" that should be used for the form.
|
protected boolean |
discoverBooleanParam(FormUIGet.ModelContext context,
java.lang.String name)
Returns the value of the given boolean parameter.
|
protected boolean |
discoverBooleanParam(FormUIGet.ModelContext context,
java.lang.String name,
boolean defaultValue)
Returns the value of the given boolean parameter.
|
protected java.util.Map |
discoverData(FormUIGet.ModelContext context)
Determines the "data" that should be used for the form.
|
protected java.lang.String |
discoverEncodingFormat(FormUIGet.ModelContext context)
Determines the "enctype" that should be used for the form.
|
protected org.json.JSONObject |
discoverFieldDefinition(FormUIGet.ModelContext context,
java.lang.String fieldName)
Returns the field definition for the given field name.
|
protected java.lang.String |
discoverSetLabel(FormSet setConfig)
Determines the label to use for the given set configuration.
|
protected java.util.Map |
discoverSetMembership(FormUIGet.ModelContext context)
Determines the set membership hierarchy.
|
protected java.lang.String |
discoverSubmissionUrl(FormUIGet.ModelContext context)
Determines the "submissionUrl" that should be used for the form.
|
protected void |
dumpFormUIModel(java.util.Map model)
Dumps the given form UI model to debug output (when debug is enabled).
|
protected java.lang.String |
dumpMap(java.util.Map map,
java.lang.String indent) |
protected java.util.Map |
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache) |
protected FormUIGet.Constraint |
generateConstraintModel(FormUIGet.ModelContext context,
FormUIGet.Field field,
FormField fieldConfig,
java.lang.String constraintId,
org.json.JSONObject constraintParams,
ConstraintHandlerDefinition defaultConstraintConfig)
Generates the model for a single constraint.
|
protected FormUIGet.Constraint |
generateConstraintModel(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig,
org.json.JSONObject constraintDefinition)
Generates the model for a single constraint.
|
protected FormUIGet.Constraint |
generateConstraintModel(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig,
java.lang.String constraintId)
Generates the model for a single constraint.
|
protected FormUIGet.Set |
generateDefaultSetModelUsingServerFields(FormUIGet.ModelContext context)
Generates the model for the default set, this will contain all the fields
returned from the server.
|
protected java.util.Map |
generateErrorModel(org.springframework.extensions.webscripts.connector.Response errorResponse)
Generates the "error" model used when an error occurs.
|
protected FormUIGet.Field |
generateFieldModel(FormUIGet.ModelContext context,
java.lang.String fieldName,
FormField fieldConfig)
Generates the model for the given field.
|
protected java.io.ByteArrayInputStream |
generateFormDefPostBody(java.lang.String itemKind,
java.lang.String itemId,
java.util.List visibleFields,
FormConfigElement formConfig)
Generates the POST body to send to the FormService.
|
protected java.util.Map |
generateFormModel(org.springframework.extensions.webscripts.WebScriptRequest request,
Mode mode,
org.springframework.extensions.webscripts.connector.Response formSvcResponse,
FormConfigElement formConfig)
Generates the "form" model passed to the FreeMarker engine.
|
protected java.util.Map |
generateFormUIModel(FormUIGet.ModelContext context)
Generates the model that will be processed by the FreeMarker engine
and thus render the form UI.
|
protected java.util.Map |
generateModel(java.lang.String itemKind,
java.lang.String itemId,
org.springframework.extensions.webscripts.WebScriptRequest request,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache)
Generates the model to send to the FreeMarker engine.
|
protected FormUIGet.Set |
generateSetModel(FormUIGet.ModelContext context,
FormSet setConfig,
java.util.List fields)
Generates the model for the given set and it's fields.
|
protected FormUIGet.Set |
generateSetModelUsingServerFields(FormUIGet.ModelContext context,
FormSet setConfig,
java.util.Map setMembership)
Generates the model for the given set, this method also recursively generates any
child sets the given set has.
|
protected FormUIGet.Set |
generateSetModelUsingVisibleFields(FormUIGet.ModelContext context,
FormSet setConfig)
Generates the model for the given set, this method also recursively generates any
child sets the given set has.
|
protected FormUIGet.Field |
generateTransientFieldModel(FormUIGet.ModelContext context,
java.lang.String fieldName,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Generates a model for a "transient" field.
|
protected FormUIGet.Field |
generateTransientFieldModel(java.lang.String fieldName,
java.lang.String template)
Generates a model for a "transient" field.
|
protected FormConfigElement |
getFormConfig(java.lang.String itemId,
java.lang.String formId)
Returns the form configuration for the given item id and optional form id.
|
protected java.lang.String |
getParameter(org.springframework.extensions.webscripts.WebScriptRequest req,
java.lang.String name)
Returns the named parameter.
|
protected java.lang.String |
getParameter(org.springframework.extensions.webscripts.WebScriptRequest req,
java.lang.String name,
java.lang.String defaultValue)
Returns the named parameter, returning the given default
value if the parameter can not be found.
|
protected java.util.List |
getVisibleFields(Mode mode,
FormConfigElement formConfig)
Returns the list of visible field names for the given mode.
|
protected java.util.List |
getVisibleFieldsInSet(FormUIGet.ModelContext context,
FormSet setConfig)
Returns the list of visible field names for the given set.
|
protected boolean |
isFieldAmbiguous(FormUIGet.ModelContext context,
java.lang.String fieldName)
Determines whether the given field is ambiguous (a property and association
have the same name).
|
protected void |
processCapabilities(FormUIGet.ModelContext context,
java.util.Map formUIModel)
Processes the "js" parameter, if present.
|
protected void |
processFieldConstraintControl(FormUIGet.ModelContext context,
FormUIGet.Field field,
FormField fieldConfig,
FormUIGet.Constraint constraint)
Processes the given constraint to ensure the field's control
adheres to the constraint.
|
protected void |
processFieldConstraintHelp(FormUIGet.ModelContext context,
FormUIGet.Field field,
FormField fieldConfig,
FormUIGet.Constraint constraint)
Processes the given constraint to add help text to the field's control
if relevant.
|
protected void |
processFieldConstraints(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Processes the constraints for the field.
|
protected void |
processFieldContent(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Processes the field for content.
|
protected void |
processFieldControl(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Processes the control for the field.
|
protected void |
processFieldData(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Processes the "data" part of the field model.
|
protected void |
processFieldIdentification(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Processes the identification part of the field model.
|
protected void |
processFields(FormUIGet.ModelContext context,
java.util.Map formUIModel)
Processes the "fields" section of the model.
|
protected void |
processFieldState(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Processes the "state" part of the field model i.e.
|
protected void |
processFieldText(FormUIGet.ModelContext context,
FormUIGet.Field field,
org.json.JSONObject fieldDefinition,
FormField fieldConfig)
Processes the "text" part of the field model i.e.
|
protected void |
processServerFields(FormUIGet.ModelContext context)
Processes the fields returned from the server (the form definition), this
method is called when there are no visible fields configured.
|
protected void |
processTemplates(FormUIGet.ModelContext context,
java.util.Map formUIModel)
Processes the optional custom templates configuration.
|
protected void |
processVisibleFields(FormUIGet.ModelContext context)
Processes the fields configured to be visible for the form.
|
protected org.springframework.extensions.webscripts.connector.Response |
retrieveFormDefinition(java.lang.String itemKind,
java.lang.String itemId,
java.util.List visibleFields,
FormConfigElement formConfig)
Retrieves the form definition from the repository FormService for the
given item.
|
protected java.lang.String |
retrieveMessage(java.lang.String messageKey,
java.lang.Object[] args)
Retrieves a localized message string.
|
void |
setConfigService(org.springframework.extensions.config.ConfigService configService)
Sets the ConfigService instance
|
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplateaddModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toStringprotected static final java.lang.String PROPERTY
protected static final java.lang.String ASSOCIATION
protected static final java.lang.String PROP_PREFIX
protected static final java.lang.String FIELD
protected static final java.lang.String SET
protected static final java.lang.String ASSOC_PREFIX
protected static final java.lang.String OLD_DATA_TYPE_PREFIX
protected static final java.lang.String ENDPOINT_ID
protected static final java.lang.String ALFRESCO_PROXY
protected static final java.lang.String CM_NAME_PROP
protected static final java.lang.String MSG_DEFAULT_SET_LABEL
protected static final java.lang.String INDENT
protected static final java.lang.String DELIMITER
protected static final java.lang.String SUBMIT_TYPE_MULTIPART
protected static final java.lang.String SUBMIT_TYPE_JSON
protected static final java.lang.String SUBMIT_TYPE_URL
protected static final java.lang.String ENCTYPE_MULTIPART
protected static final java.lang.String ENCTYPE_JSON
protected static final java.lang.String ENCTYPE_URL
protected static final java.lang.String DEFAULT_MODE
protected static final java.lang.String DEFAULT_SUBMIT_TYPE
protected static final java.lang.String DEFAULT_METHOD
protected static final java.lang.String DEFAULT_FIELD_TYPE
protected static final java.lang.String DEFAULT_CONSTRAINT_EVENT
protected static final java.lang.String CONFIG_FORMS
protected static final java.lang.String PARAM_ITEM_KIND
protected static final java.lang.String PARAM_ITEM_ID
protected static final java.lang.String PARAM_FORM_ID
protected static final java.lang.String PARAM_SUBMIT_TYPE
protected static final java.lang.String PARAM_SUBMISSION_URL
protected static final java.lang.String PARAM_JS
protected static final java.lang.String CONSTRAINT_MANDATORY
protected static final java.lang.String CONSTRAINT_LIST
protected static final java.lang.String CONSTRAINT_LENGTH
protected static final java.lang.String CONSTRAINT_NUMBER
protected static final java.lang.String CONSTRAINT_MINMAX
protected static final java.lang.String CONSTRAINT_REGEX
protected static final java.lang.String CONSTRAINT_NODE_HANDLER
protected static final java.lang.String CONSTRAINT_MSG_LENGTH
protected static final java.lang.String CONSTRAINT_MSG_MINMAX
protected static final java.lang.String CONSTRAINT_MSG_NUMBER
protected static final java.lang.String CONTROL_SELECT_MANY
protected static final java.lang.String CONTROL_SELECT_ONE
protected static final java.lang.String CONTROL_PARAM_OPTIONS
protected static final java.lang.String CONTROL_PARAM_OPTION_SEPARATOR
protected static final java.lang.String MODEL_DATA
protected static final java.lang.String MODEL_DEFINITION
protected static final java.lang.String MODEL_FIELDS
protected static final java.lang.String MODEL_FORM_DATA
protected static final java.lang.String MODEL_FORCE
protected static final java.lang.String MODEL_MESSAGE
protected static final java.lang.String MODEL_PROTECTED_FIELD
protected static final java.lang.String MODEL_REPEATING
protected static final java.lang.String MODEL_DEFAULT_VALUE
protected static final java.lang.String MODEL_FORM
protected static final java.lang.String MODEL_ERROR
protected static final java.lang.String MODEL_NAME
protected static final java.lang.String MODEL_MODE
protected static final java.lang.String MODEL_METHOD
protected static final java.lang.String MODEL_ENCTYPE
protected static final java.lang.String MODEL_SUBMISSION_URL
protected static final java.lang.String MODEL_SHOW_CANCEL_BUTTON
protected static final java.lang.String MODEL_SHOW_RESET_BUTTON
protected static final java.lang.String MODEL_SHOW_SUBMIT_BUTTON
protected static final java.lang.String MODEL_SHOW_CAPTION
protected static final java.lang.String MODEL_DESTINATION
protected static final java.lang.String MODEL_REDIRECT
protected static final java.lang.String MODEL_ARGUMENTS
protected static final java.lang.String MODEL_STRUCTURE
protected static final java.lang.String MODEL_CONSTRAINTS
protected static final java.lang.String MODEL_VIEW_TEMPLATE
protected static final java.lang.String MODEL_EDIT_TEMPLATE
protected static final java.lang.String MODEL_CREATE_TEMPLATE
protected static final java.lang.String MODEL_TYPE
protected static final java.lang.String MODEL_LABEL
protected static final java.lang.String MODEL_DESCRIPTION
protected static final java.lang.String MODEL_MANDATORY
protected static final java.lang.String MODEL_DATA_TYPE
protected static final java.lang.String MODEL_DATA_TYPE_PARAMETERS
protected static final java.lang.String MODEL_DATA_KEY_NAME
protected static final java.lang.String MODEL_ENDPOINT_TYPE
protected static final java.lang.String MODEL_ENDPOINT_MANDATORY
protected static final java.lang.String MODEL_ENDPOINT_MANY
protected static final java.lang.String MODEL_ENDPOINT_DIRECTION
protected static final java.lang.String MODEL_JAVASCRIPT
protected static final java.lang.String MODEL_CAPABILITIES
protected static final java.lang.String MODEL_PARAMETERS
protected static final java.lang.String MODEL_MAX_LENGTH
protected static final java.lang.String MODEL_GROUP
protected org.springframework.extensions.config.ConfigService configService
public void setConfigService(org.springframework.extensions.config.ConfigService configService)
configService - protected java.util.Map executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache)
executeImpl in class org.springframework.extensions.webscripts.DeclarativeWebScriptprotected java.util.Map generateModel(java.lang.String itemKind,
java.lang.String itemId,
org.springframework.extensions.webscripts.WebScriptRequest request,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache)
itemKind - The form itemKinditemId - The form itemIdrequest - The WebScriptRequeststatus - The response statuscache - Cache controlprotected java.lang.String getParameter(org.springframework.extensions.webscripts.WebScriptRequest req,
java.lang.String name)
req - The WebScriptRequestname - The name of the parameter to findprotected java.lang.String getParameter(org.springframework.extensions.webscripts.WebScriptRequest req,
java.lang.String name,
java.lang.String defaultValue)
req - The WebScriptRequestname - The name of the parameter to finddefaultValue - The default valueprotected FormConfigElement getFormConfig(java.lang.String itemId, java.lang.String formId)
itemId - The form itemIdformId - The id of the form to lookupprotected java.util.List getVisibleFields(Mode mode, FormConfigElement formConfig)
mode - The form modeformConfig - The form configurationprotected java.util.List getVisibleFieldsInSet(FormUIGet.ModelContext context, FormSet setConfig)
context - The contextsetConfig - Set configurationprotected org.springframework.extensions.webscripts.connector.Response retrieveFormDefinition(java.lang.String itemKind,
java.lang.String itemId,
java.util.List visibleFields,
FormConfigElement formConfig)
itemKind - The form item kinditemId - The form item idvisibleFields - The list of field names to return or null
to return all fieldsformConfig - The form configurationprotected java.lang.String retrieveMessage(java.lang.String messageKey,
java.lang.Object[] args)
messageKey - The message key to lookupargs - Optional replacement argumentsprotected java.io.ByteArrayInputStream generateFormDefPostBody(java.lang.String itemKind,
java.lang.String itemId,
java.util.List visibleFields,
FormConfigElement formConfig)
throws java.io.IOException
itemKind - The form item kinditemId - The form item idvisibleFields - The list of field names to return or null
to return all fieldsformConfig - The form configurationjava.io.IOExceptionprotected java.util.Map generateFormModel(org.springframework.extensions.webscripts.WebScriptRequest request,
Mode mode,
org.springframework.extensions.webscripts.connector.Response formSvcResponse,
FormConfigElement formConfig)
request - The WebScriptRequestmode - The mode of the formformSvcResponse - Response representing the form definitionformConfig - The form configurationprotected java.util.Map generateFormUIModel(FormUIGet.ModelContext context)
context - The contextprotected java.lang.String discoverEncodingFormat(FormUIGet.ModelContext context)
context - The contextprotected java.lang.String discoverSubmissionUrl(FormUIGet.ModelContext context)
context - The contextprotected java.util.Map discoverArguments(FormUIGet.ModelContext context)
context - The contextprotected java.util.Map discoverData(FormUIGet.ModelContext context)
context - The contextprotected boolean discoverBooleanParam(FormUIGet.ModelContext context, java.lang.String name)
context - The contextname - The name of the parameterprotected boolean discoverBooleanParam(FormUIGet.ModelContext context, java.lang.String name, boolean defaultValue)
context - The contextname - The name of the parameterdefaultValue - The default value to use if the parameter
is not foundprotected org.json.JSONObject discoverFieldDefinition(FormUIGet.ModelContext context, java.lang.String fieldName)
context - The contextfieldName - The name of the field to get the definition forprotected java.lang.String discoverSetLabel(FormSet setConfig)
setConfig - Set configurationprotected java.util.Map discoverSetMembership(FormUIGet.ModelContext context)
context - The contextprotected void processCapabilities(FormUIGet.ModelContext context, java.util.Map formUIModel)
context - The contextformUIModel - The form UI modelprotected void processTemplates(FormUIGet.ModelContext context, java.util.Map formUIModel)
context - The contextformUIModel - The form UI modelprotected void processFields(FormUIGet.ModelContext context, java.util.Map formUIModel)
context - The contextformUIModel - The form UI modelprotected void processVisibleFields(FormUIGet.ModelContext context)
context - The contextprotected void processServerFields(FormUIGet.ModelContext context)
context - The contextprotected FormUIGet.Set generateSetModelUsingVisibleFields(FormUIGet.ModelContext context, FormSet setConfig)
context - The contextsetConfig - The set configurationprotected FormUIGet.Set generateSetModelUsingServerFields(FormUIGet.ModelContext context, FormSet setConfig, java.util.Map setMembership)
context - The contextsetConfig - Set configurationsetMembership - The set hierarchyprotected FormUIGet.Set generateSetModel(FormUIGet.ModelContext context, FormSet setConfig, java.util.List fields)
context - The contextsetConfig - The set configurationfields - List of field in the setprotected FormUIGet.Set generateDefaultSetModelUsingServerFields(FormUIGet.ModelContext context)
context - The contextprotected FormUIGet.Field generateFieldModel(FormUIGet.ModelContext context, java.lang.String fieldName, FormField fieldConfig)
context - The contextfieldName - The name of the field to be generatedfieldConfig - The configuration for the fieldprotected boolean isFieldAmbiguous(FormUIGet.ModelContext context, java.lang.String fieldName)
context - The contextfieldName - The name of the fieldprotected FormUIGet.Field generateTransientFieldModel(java.lang.String fieldName, java.lang.String template)
fieldName - The name of the fieldtemplate - The control template to useprotected FormUIGet.Field generateTransientFieldModel(FormUIGet.ModelContext context, java.lang.String fieldName, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfieldName - The name of the field to be addedorg.json.JSONExceptionprotected void processFieldIdentification(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedorg.json.JSONExceptionprotected void processFieldState(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedorg.json.JSONExceptionprotected void processFieldText(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedorg.json.JSONExceptionprotected void processFieldData(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedorg.json.JSONExceptionprotected void processFieldConstraints(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedorg.json.JSONExceptionprotected FormUIGet.Constraint generateConstraintModel(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig, java.lang.String constraintId) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedconstraintId - The constraint identifierorg.json.JSONExceptionprotected FormUIGet.Constraint generateConstraintModel(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig, org.json.JSONObject constraintDefinition) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedconstraintDefinition - The constraint definitionorg.json.JSONExceptionprotected FormUIGet.Constraint generateConstraintModel(FormUIGet.ModelContext context, FormUIGet.Field field, FormField fieldConfig, java.lang.String constraintId, org.json.JSONObject constraintParams, ConstraintHandlerDefinition defaultConstraintConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldConfig - The configuration of the field to be processedconstraintId - The constraint identifierconstraintParams - The constraint parametersdefaultConstraintConfig - org.json.JSONExceptionprotected void processFieldConstraintControl(FormUIGet.ModelContext context, FormUIGet.Field field, FormField fieldConfig, FormUIGet.Constraint constraint) throws org.json.JSONException
context - The contextfield - The field to be processedfieldConfig - The configuration of the field to be processedconstraint - The constraintorg.json.JSONExceptionprotected void processFieldConstraintHelp(FormUIGet.ModelContext context, FormUIGet.Field field, FormField fieldConfig, FormUIGet.Constraint constraint) throws org.json.JSONException
context - The contextfield - The field to be processedfieldConfig - The configuration of the field to be processedconstraint - The constraintorg.json.JSONExceptionprotected void processFieldControl(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedorg.json.JSONExceptionprotected void processFieldContent(FormUIGet.ModelContext context, FormUIGet.Field field, org.json.JSONObject fieldDefinition, FormField fieldConfig) throws org.json.JSONException
context - The contextfield - The field to be processedfieldDefinition - The definition of the field to be processedfieldConfig - The configuration of the field to be processedorg.json.JSONExceptionprotected java.util.Map generateErrorModel(org.springframework.extensions.webscripts.connector.Response errorResponse)
errorResponse - Response object representing the errorprotected void dumpFormUIModel(java.util.Map model)
model - The form UI model to dumpprotected java.lang.String dumpMap(java.util.Map map,
java.lang.String indent)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.