Class AbstractFormProcessor

java.lang.Object
org.alfresco.repo.forms.processor.AbstractFormProcessor
All Implemented Interfaces:
FormProcessor
Direct Known Subclasses:
FilteredFormProcessor

public abstract class AbstractFormProcessor extends Object implements FormProcessor
Abstract base class for all FormProcessor implementations provides a regex pattern match to test for processor applicability
Author:
Gavin Cornwell
  • Field Details

  • Constructor Details

    • AbstractFormProcessor

      public AbstractFormProcessor()
  • Method Details

    • setProcessorRegistry

      public void setProcessorRegistry(FormProcessorRegistry processorRegistry)
      Sets the form process registry
      Parameters:
      processorRegistry - The FormProcessorRegistry instance
    • setMatchPattern

      public void setMatchPattern(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 String toString()
      Overrides:
      toString in class Object
    • setFormItemType

      protected void setFormItemType(Form form, String type)
      Gets the Item from the form parameter and sets its type field to type.
      Parameters:
      form - Form
      type - String
    • setFormItemUrl

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