public class FormManager extends AbstractLogEnabled implements Component, Serviceable, Contextualizable
Modifier and Type | Field and Description |
---|---|
private static String |
__FORM_TYPE_CMS |
private Context |
_context |
private FormParser |
_formParser |
private FormPropertiesManager |
_formPropertiesManager |
private FormTableManager |
_formTableManager |
private JdbcWorkflowStore |
_jdbcWorkflowStore |
private ServiceManager |
_manager |
private DOMParser |
_parser |
private WorkflowHelper |
_workflowHelper |
private WorkflowProvider |
_workflowProvider |
static String |
ENTRY_WORKFLOW_REINITIALIZATION
Constant for entry workflow reinitialization
|
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
FormManager() |
Modifier and Type | Method and Description |
---|---|
protected Set<RichText> |
_getRichTexts(CompositeMetadata metadataHolder)
Get the rich texts
|
private void |
_processForm(Content content,
String contentName,
String siteName,
List<Form> forms,
Node formNode) |
private void |
_removeUnusedForms(Content content,
String contentName,
List<Form> forms)
Remove the unused forms
|
private void |
_resetWorkflowTables(Content content,
Form form,
boolean dropColumn,
boolean addColumn)
Remove the workflow tables and the workflow id column if needed
|
void |
contextualize(Context context) |
private FormPropertiesManager |
getFormPropertiesManager() |
private FormTableManager |
getFormTableManager() |
private JdbcWorkflowStore |
getJdbcWorkflowStore() |
private WorkflowHelper |
getWorkflowHelper() |
private WorkflowProvider |
getWorkflowProvider() |
void |
processContentForms(Content content)
Find all the forms the content contains and process them.
|
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String ENTRY_WORKFLOW_REINITIALIZATION
private static final String __FORM_TYPE_CMS
private ServiceManager _manager
private FormPropertiesManager _formPropertiesManager
private FormParser _formParser
private FormTableManager _formTableManager
private WorkflowProvider _workflowProvider
private JdbcWorkflowStore _jdbcWorkflowStore
private WorkflowHelper _workflowHelper
public FormManager()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
private FormPropertiesManager getFormPropertiesManager()
private FormTableManager getFormTableManager()
private WorkflowProvider getWorkflowProvider()
private WorkflowHelper getWorkflowHelper()
private JdbcWorkflowStore getJdbcWorkflowStore()
public void processContentForms(Content content) throws SAXException, IOException, com.opensymphony.workflow.WorkflowException
content
- the content.SAXException
- if a SAX exception occurs during content parsing.IOException
- if an I/O exception occurs during content parsing.com.opensymphony.workflow.WorkflowException
- if an exception occurs while handling the form's workflowprivate void _processForm(Content content, String contentName, String siteName, List<Form> forms, Node formNode) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException
private void _resetWorkflowTables(Content content, Form form, boolean dropColumn, boolean addColumn) throws FormsException, com.opensymphony.workflow.WorkflowException, SQLException
content
- The content holding the formform
- the formdropColumn
- true to drop the workflow id columnaddColumn
- true to add the workflow id columnFormsException
- if an error occurs while retrieving the workflow instances idscom.opensymphony.workflow.WorkflowException
- if an error occurs during the reset of the workflow of the form entriesSQLException
- if an error occurs during the SQL queriesprivate void _removeUnusedForms(Content content, String contentName, List<Form> forms)
content
- The contentcontentName
- The name of the contentforms
- The forms submittedprotected Set<RichText> _getRichTexts(CompositeMetadata metadataHolder)
metadataHolder
- the metadata holder