org.alfresco.repo.forms.processor.action
Class ActionFormProcessor

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.action.ActionFormProcessor
All Implemented Interfaces:
FormProcessor

public class ActionFormProcessor
extends FilteredFormProcessor

This class is a FormProcessor for actions.

Since:
4.0

Field Summary
protected static java.lang.String EXECUTE_ASYNCHRONOUSLY
           
static java.lang.String ITEM_KIND
           
 
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
ActionFormProcessor()
           
 
Method Summary
protected  java.util.List generateDefaultFields(FormCreationData data, java.util.List fieldsToIgnore)
          Generates a list of default fields to add if no field names are specified.
protected  java.util.List generateSelectedFields(java.util.List requestedFields, FormCreationData data)
           
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.String getItemType(ActionDefinition item)
          Returns a String describing the type fo the specified item.
protected  java.lang.String getItemURI(ActionDefinition item)
          Returns the URI location of the specified item.
protected  org.apache.commons.logging.Log getLogger()
          Retrieves a logger instance to log to.
protected  ActionDefinition getTypedItem(Item item)
          Returns a typed Object representing the given item.
protected  ActionFormResult internalPersist(ActionDefinition item, FormData data)
          Persists the form data.
protected  java.lang.Object makeItemData(ActionDefinition item)
          Creates a data object used by the FormProcessor and FieldProcessors to create Fields
 void setActionService(ActionService actionService)
           
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
           
 
Methods inherited from class org.alfresco.repo.forms.processor.FilteredFormProcessor
generate, internalGenerate, persist, populateForm, 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

ITEM_KIND

public static final java.lang.String ITEM_KIND
See Also:
Constant Field Values

EXECUTE_ASYNCHRONOUSLY

protected static final java.lang.String EXECUTE_ASYNCHRONOUSLY
See Also:
Constant Field Values
Constructor Detail

ActionFormProcessor

public ActionFormProcessor()
Method Detail

setActionService

public void setActionService(ActionService actionService)

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)

setNamespaceService

public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)

getLogger

protected org.apache.commons.logging.Log getLogger()
Description copied from class: FilteredFormProcessor
Retrieves a logger instance to log to.

Specified by:
getLogger in class FilteredFormProcessor
Returns:
Log instance to log to.

getTypedItem

protected ActionDefinition 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

getItemType

protected java.lang.String getItemType(ActionDefinition item)
Description copied from class: FilteredFormProcessor
Returns a String describing the type fo the specified item.

Specified by:
getItemType in class FilteredFormProcessor
Returns:

getItemURI

protected java.lang.String getItemURI(ActionDefinition item)
Description copied from class: FilteredFormProcessor
Returns the URI location of the specified item.

Specified by:
getItemURI in class FilteredFormProcessor
Returns:

internalPersist

protected ActionFormResult internalPersist(ActionDefinition 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

generateDefaultFields

protected java.util.List generateDefaultFields(FormCreationData data,
                                               java.util.List fieldsToIgnore)
Description copied from class: FilteredFormProcessor
Generates a list of default fields to add if no field names are specified.

Overrides:
generateDefaultFields in class FilteredFormProcessor
Parameters:
data - Used for field creation.
Returns:
a List of Fields which may be empty.

generateSelectedFields

protected java.util.List generateSelectedFields(java.util.List requestedFields,
                                                FormCreationData data)
Overrides:
generateSelectedFields in class FilteredFormProcessor

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.

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

makeItemData

protected java.lang.Object makeItemData(ActionDefinition item)
Description copied from class: FilteredFormProcessor
Creates a data object used by the FormProcessor and FieldProcessors to create Fields

Specified by:
makeItemData in class FilteredFormProcessor
Returns:


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