Class AbstractFormProcessor
- java.lang.Object
-
- org.alfresco.repo.forms.processor.AbstractFormProcessor
-
- All Implemented Interfaces:
FormProcessor
- Direct Known Subclasses:
FilteredFormProcessor
public abstract class AbstractFormProcessor extends java.lang.Object implements FormProcessor
Abstract base class for all FormProcessor implementations provides a regex pattern match to test for processor applicability- Author:
- Gavin Cornwell
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanactivestatic java.lang.StringDESTINATIONprotected java.lang.StringmatchPatternprotected java.util.regex.PatternpatternMatcherprotected FormProcessorRegistryprocessorRegistry
-
Constructor Summary
Constructors Constructor Description AbstractFormProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisActive()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, java.lang.String type)Gets the Item from theformparameter and sets its type field totype.protected voidsetFormItemUrl(Form form, java.lang.String url)Gets the Item from theformparameter and sets its URL field tourl.voidsetMatchPattern(java.lang.String pattern)Sets the match patternvoidsetProcessorRegistry(FormProcessorRegistry processorRegistry)Sets the form process registryjava.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.forms.processor.FormProcessor
generate, persist
-
-
-
-
Field Detail
-
DESTINATION
public static final java.lang.String DESTINATION
- See Also:
- Constant Field Values
-
processorRegistry
protected FormProcessorRegistry processorRegistry
-
matchPattern
protected java.lang.String matchPattern
-
active
protected boolean active
-
patternMatcher
protected java.util.regex.Pattern patternMatcher
-
-
Method Detail
-
setProcessorRegistry
public void setProcessorRegistry(FormProcessorRegistry processorRegistry)
Sets the form process registry- Parameters:
processorRegistry- The FormProcessorRegistry instance
-
setMatchPattern
public void setMatchPattern(java.lang.String pattern)
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
public boolean isApplicable(Item item)
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setFormItemType
protected void setFormItemType(Form form, java.lang.String type)
Gets the Item from theformparameter and sets its type field totype.- Parameters:
form- Formtype- String
-
setFormItemUrl
protected void setFormItemUrl(Form form, java.lang.String url)
Gets the Item from theformparameter and sets its URL field tourl.- Parameters:
form- Formurl- String
-
-