Class AbstractFormProcessor
java.lang.Object
org.alfresco.repo.forms.processor.AbstractFormProcessor
- All Implemented Interfaces:
FormProcessor
- Direct Known Subclasses:
FilteredFormProcessor
Abstract base class for all FormProcessor implementations provides a regex pattern match to test for processor applicability
- Author:
- Gavin Cornwell
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final Stringprotected Stringprotected Patternprotected FormProcessorRegistry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive()Determines whether this form processor is activebooleanisApplicable(Item item) Determines whether this form processor is applicable for the supplied itemvoidregister()Registers this processor with the processor registryvoidsetActive(boolean active) Sets whether this processor is activeprotected voidsetFormItemType(Form form, String type) Gets the Item from theformparameter and sets its type field totype.protected voidsetFormItemUrl(Form form, String url) Gets the Item from theformparameter and sets its URL field tourl.voidsetMatchPattern(String pattern) Sets the match patternvoidsetProcessorRegistry(FormProcessorRegistry processorRegistry) Sets the form process registrytoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.repo.forms.processor.FormProcessor
generate, persist
-
Field Details
-
DESTINATION
- See Also:
-
processorRegistry
-
matchPattern
-
active
protected boolean active -
patternMatcher
-
-
Constructor Details
-
AbstractFormProcessor
public AbstractFormProcessor()
-
-
Method Details
-
setProcessorRegistry
Sets the form process registry- Parameters:
processorRegistry- The FormProcessorRegistry instance
-
setMatchPattern
Sets the match pattern- Parameters:
pattern- The regex pattern to use to determine if this processor is applicable
-
setActive
public void setActive(boolean active) Sets whether this processor is active- Parameters:
active- true if the processor should be active
-
register
public void register()Registers this processor with the processor registry -
isActive
public boolean isActive()Description copied from interface:FormProcessorDetermines whether this form processor is active- Specified by:
isActivein interfaceFormProcessor- Returns:
- true if the processor is active
-
isApplicable
Description copied from interface:FormProcessorDetermines whether this form processor is applicable for the supplied item- Specified by:
isApplicablein interfaceFormProcessor- Parameters:
item- The item the form is being generated for- Returns:
- true if the processor is applicable
-
toString
-
setFormItemType
Gets the Item from theformparameter and sets its type field totype.- Parameters:
form- Formtype- String
-
setFormItemUrl
Gets the Item from theformparameter and sets its URL field tourl.- Parameters:
form- Formurl- String
-