org.alfresco.repo.forms.processor.workflow
Class AbstractWorkflowFormProcessor

java.lang.Object
  extended by org.alfresco.repo.forms.processor.AbstractFormProcessor
      extended by org.alfresco.repo.forms.processor.FilteredFormProcessor
          extended by org.alfresco.repo.forms.processor.node.ContentModelFormProcessor
              extended by org.alfresco.repo.forms.processor.workflow.AbstractWorkflowFormProcessor
All Implemented Interfaces:
FormProcessor
Direct Known Subclasses:
TaskFormProcessor, WorkflowFormProcessor

public abstract class AbstractWorkflowFormProcessor
extends ContentModelFormProcessor

Abstract base class for workflow based form processors.

Since:
3.4

Field Summary
protected  BehaviourFilter behaviourFilter
           
protected  WorkflowService workflowService
          WorkflowService
 
Fields inherited from class org.alfresco.repo.forms.processor.node.ContentModelFormProcessor
associationNamePattern, contentService, dictionaryService, fileFolderService, namespaceService, nodeService, propertyNamePattern, transientPropertyPattern
 
Fields inherited from class org.alfresco.repo.forms.processor.FilteredFormProcessor
fieldProcessorRegistry, filterRegistry
 
Fields inherited from class org.alfresco.repo.forms.processor.AbstractFormProcessor
active, DESTINATION, matchPattern, patternMatcher, processorRegistry
 
Constructor Summary
AbstractWorkflowFormProcessor()
           
 
Method Summary
protected  java.util.List getDefaultIgnoredFields()
          When a Form is generated with no field names specifically set then a default Form is created.
protected  java.lang.Object getTypedItem(Item item)
          Returns a typed Object representing the given item.
protected abstract  java.lang.Object getTypedItemForDecodedId(java.lang.String itemId)
          Returns the typed item.
protected  java.lang.Object internalPersist(java.lang.Object item, FormData data)
          Persists the form data.
protected abstract  ContentModelFormPersister makeFormPersister(java.lang.Object item)
          Returns an implementation of ContentModelFormPersister which is used to accumulate all the changes specified in the Form and then persist them.
protected  void populateForm(Form form, java.util.List fields, FormCreationData data)
          This method generates all the fields to be added and adds them to the Form, together with the associated field data.
 void setBehaviourFilter(BehaviourFilter behaviourFilter)
           
 void setWorkflowService(WorkflowService workflowService)
           
 
Methods inherited from class org.alfresco.repo.forms.processor.node.ContentModelFormProcessor
addPropertyDataIfRequired, determineDefaultMimetype, generateDefaultFields, getAspectNames, getAssociationValues, getBaseType, getPropertyValues, getTransientValues, makeItemData, persistNode, processAssociationPersist, processContentPropertyPersist, processEncodingPropertyPersist, processMimetypePropertyPersist, processNamePropertyPersist, processPropertyPersist, setContentService, setDictionaryService, setFileFolderService, setNamespaceService, setNodeService
 
Methods inherited from class org.alfresco.repo.forms.processor.FilteredFormProcessor
generate, generateSelectedFields, getItemType, getItemURI, getLogger, internalGenerate, persist, setFieldProcessorRegistry, setFilterRegistry, setIgnoredFields
 
Methods inherited from class org.alfresco.repo.forms.processor.AbstractFormProcessor
isActive, isApplicable, register, setActive, setFormItemType, setFormItemUrl, setMatchPattern, setProcessorRegistry, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

workflowService

protected WorkflowService workflowService
WorkflowService


behaviourFilter

protected BehaviourFilter behaviourFilter
Constructor Detail

AbstractWorkflowFormProcessor

public AbstractWorkflowFormProcessor()
Method Detail

populateForm

protected void populateForm(Form form,
                            java.util.List fields,
                            FormCreationData data)
Description copied from class: FilteredFormProcessor
This method generates all the fields to be added and adds them to the Form, together with the associated field data.

Overrides:
populateForm in class FilteredFormProcessor
Parameters:
form - The Form to which the fields are added.
fields - The names of all the fields to be added.
data - FormCreationData used to generate all the fields.

internalPersist

protected java.lang.Object internalPersist(java.lang.Object item,
                                           FormData data)
Description copied from class: FilteredFormProcessor
Persists the form data.

Specified by:
internalPersist in class FilteredFormProcessor
Parameters:
item - The object to persist the form for
data - The data to persist
Returns:
The object that got created or modified

setWorkflowService

public void setWorkflowService(WorkflowService workflowService)
Parameters:
workflowService - the workflowService to set

setBehaviourFilter

public void setBehaviourFilter(BehaviourFilter behaviourFilter)
Parameters:
behaviourFilter - the behaviourFilter to set

getTypedItem

protected java.lang.Object getTypedItem(Item item)
Description copied from class: FilteredFormProcessor
Returns a typed Object representing the given item.

Subclasses that represent a form type will return a typed object that is then passed to each of it's handlers, the handlers can therefore safely cast the Object to the type they expect.

Specified by:
getTypedItem in class FilteredFormProcessor
Parameters:
item - The item to get a typed object for
Returns:
The typed object

getDefaultIgnoredFields

protected java.util.List getDefaultIgnoredFields()
Description copied from class: FilteredFormProcessor
When a Form is generated with no field names specifically set then a default Form is created. The default Form contains all the properties and associations related to the Item, excluding a blacklist of ignored fields which defaults to the return value of this method. The default ignored values can be overridden by setting the property ignoredFields.

Overrides:
getDefaultIgnoredFields in class ContentModelFormProcessor
Returns:
the names of all the fields to be excluded from the default Form if no defaultFields property is explicitly set.

makeFormPersister

protected abstract ContentModelFormPersister makeFormPersister(java.lang.Object item)
Returns an implementation of ContentModelFormPersister which is used to accumulate all the changes specified in the Form and then persist them.

Parameters:
item -
Returns:

getTypedItemForDecodedId

protected abstract java.lang.Object getTypedItemForDecodedId(java.lang.String itemId)
Returns the typed item.

Parameters:
itemId - the decoded item Id.
Returns:


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