org.alfresco.repo.forms.processor
Class AbstractFormProcessor

java.lang.Object
  extended by 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


Field Summary
protected  boolean active
           
static java.lang.String DESTINATION
           
protected  java.lang.String matchPattern
           
protected  java.util.regex.Pattern patternMatcher
           
protected  FormProcessorRegistry processorRegistry
           
 
Constructor Summary
AbstractFormProcessor()
           
 
Method Summary
 boolean isActive()
          Determines whether this form processor is active
 boolean isApplicable(Item item)
          Determines whether this form processor is applicable for the supplied item
 void register()
          Registers this processor with the processor registry
 void setActive(boolean active)
          Sets whether this processor is active
protected  void setFormItemType(Form form, java.lang.String type)
          Gets the Item from the form parameter and sets its type field to type.
protected  void setFormItemUrl(Form form, java.lang.String url)
          Gets the Item from the form parameter and sets its URL field to url.
 void setMatchPattern(java.lang.String pattern)
          Sets the match pattern
 void setProcessorRegistry(FormProcessorRegistry processorRegistry)
          Sets the form process registry
 java.lang.String toString()
           
 
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
Constructor Detail

AbstractFormProcessor

public AbstractFormProcessor()
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: FormProcessor
Determines whether this form processor is active

Specified by:
isActive in interface FormProcessor
Returns:
true if the processor is active

isApplicable

public boolean isApplicable(Item item)
Description copied from interface: FormProcessor
Determines whether this form processor is applicable for the supplied item

Specified by:
isApplicable in interface FormProcessor
Parameters:
item - The item the form is being generated for
Returns:
true if the processor is applicable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setFormItemType

protected void setFormItemType(Form form,
                               java.lang.String type)
Gets the Item from the form parameter and sets its type field to type.

Parameters:
form -
type -

setFormItemUrl

protected void setFormItemUrl(Form form,
                              java.lang.String url)
Gets the Item from the form parameter and sets its URL field to url.

Parameters:
form -
url -


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