Class ActionFormProcessor
- java.lang.Object
-
- org.alfresco.repo.forms.processor.AbstractFormProcessor
-
- org.alfresco.repo.forms.processor.FilteredFormProcessor<ActionDefinition,ActionFormResult>
-
- org.alfresco.repo.forms.processor.action.ActionFormProcessor
-
- All Implemented Interfaces:
FormProcessor
public class ActionFormProcessor extends FilteredFormProcessor<ActionDefinition,ActionFormResult>
This class is aFormProcessorforactions.- Since:
- 4.0
- Author:
- Neil Mc Erlean
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringEXECUTE_ASYNCHRONOUSLYstatic java.lang.StringITEM_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
Constructors Constructor Description ActionFormProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<Field>generateDefaultFields(FormCreationData data, java.util.List<java.lang.String> fieldsToIgnore)Generates a list of default fields to add if no field names are specified.protected java.util.List<Field>generateSelectedFields(java.util.List<java.lang.String> requestedFields, FormCreationData data)protected java.util.List<java.lang.String>getDefaultIgnoredFields()protected java.lang.StringgetItemType(ActionDefinition item)Returns aStringdescribing the type fo the specified item.protected java.lang.StringgetItemURI(ActionDefinition item)Returns the URI location of the specified item.protected org.apache.commons.logging.LoggetLogger()Retrieves a logger instance to log to.protected ActionDefinitiongetTypedItem(Item item)Returns a typed Object representing the given item.protected ActionFormResultinternalPersist(ActionDefinition item, FormData data)Persists the form data.protected java.lang.ObjectmakeItemData(ActionDefinition item)voidsetActionService(ActionService actionService)voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)voidsetNamespaceService(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
-
-
-
-
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
-
-
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:FilteredFormProcessorRetrieves a logger instance to log to.- Specified by:
getLoggerin classFilteredFormProcessor<ActionDefinition,ActionFormResult>- Returns:
- Log instance to log to.
-
getTypedItem
protected ActionDefinition getTypedItem(Item item)
Description copied from class:FilteredFormProcessorReturns 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:
getTypedItemin classFilteredFormProcessor<ActionDefinition,ActionFormResult>- 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:FilteredFormProcessorReturns aStringdescribing the type fo the specified item.- Specified by:
getItemTypein classFilteredFormProcessor<ActionDefinition,ActionFormResult>- Parameters:
item- ItemType- Returns:
- String
-
getItemURI
protected java.lang.String getItemURI(ActionDefinition item)
Description copied from class:FilteredFormProcessorReturns the URI location of the specified item.- Specified by:
getItemURIin classFilteredFormProcessor<ActionDefinition,ActionFormResult>- Parameters:
item- ItemType- Returns:
- String
-
internalPersist
protected ActionFormResult internalPersist(ActionDefinition item, FormData data)
Description copied from class:FilteredFormProcessorPersists the form data.- Specified by:
internalPersistin classFilteredFormProcessor<ActionDefinition,ActionFormResult>- Parameters:
item- The object to persist the form fordata- The data to persist- Returns:
- The object that got created or modified
-
generateDefaultFields
protected java.util.List<Field> generateDefaultFields(FormCreationData data, java.util.List<java.lang.String> fieldsToIgnore)
Description copied from class:FilteredFormProcessorGenerates a list of default fields to add if no field names are specified.- Overrides:
generateDefaultFieldsin classFilteredFormProcessor<ActionDefinition,ActionFormResult>- Parameters:
data- Used for field creation.fieldsToIgnore- TODO- Returns:
- a
ListofFieldswhich may be empty.
-
generateSelectedFields
protected java.util.List<Field> generateSelectedFields(java.util.List<java.lang.String> requestedFields, FormCreationData data)
- Overrides:
generateSelectedFieldsin classFilteredFormProcessor<ActionDefinition,ActionFormResult>
-
getDefaultIgnoredFields
protected java.util.List<java.lang.String> getDefaultIgnoredFields()
Description copied from class:FilteredFormProcessorWhen aFormis generated with no field names specifically set then a defaultFormis created. The defaultFormcontains all the properties and associations related to theItem, 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 propertyignoredFields.- Specified by:
getDefaultIgnoredFieldsin classFilteredFormProcessor<ActionDefinition,ActionFormResult>- Returns:
- the names of all the fields to be excluded from the default
Formif nodefaultFieldsproperty is explicitly set.
-
makeItemData
protected java.lang.Object makeItemData(ActionDefinition item)
Description copied from class:FilteredFormProcessor- Specified by:
makeItemDatain classFilteredFormProcessor<ActionDefinition,ActionFormResult>- Returns:
- Object
-
-