org.apache.cocoon.forms.formmodel.algorithms
Class AbstractBaseAlgorithmBuilder

java.lang.Object
  extended by org.apache.cocoon.forms.formmodel.algorithms.AbstractBaseAlgorithmBuilder
All Implemented Interfaces:
Contextualizable, LogEnabled, Serviceable, CalculatedFieldAlgorithmBuilder
Direct Known Subclasses:
JavaAlgorithmBuilder, SimpleFormulaBuilder

public abstract class AbstractBaseAlgorithmBuilder
extends Object
implements CalculatedFieldAlgorithmBuilder, LogEnabled, Contextualizable, Serviceable

Abstract builder for AbstractBaseAlgorithm subclasses.

This class parses the default triggers attribute, containing a comma separated list of widget paths as defined in WidgetFinder. It also calls the LifecycleHelper so that algorithms gets their logger and context.

Version:
$Id: AbstractBaseAlgorithmBuilder.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Field Summary
protected  Context context
           
 
Fields inherited from interface org.apache.cocoon.forms.formmodel.CalculatedFieldAlgorithmBuilder
ROLE
 
Constructor Summary
AbstractBaseAlgorithmBuilder()
           
 
Method Summary
 void contextualize(Context context)
           
 void enableLogging(Logger logger)
           
protected  Logger getLogger()
           
 void service(ServiceManager manager)
           
protected  void setup(Element algorithmElement, AbstractBaseAlgorithm algorithm)
           
 void setupComponent(CalculatedFieldAlgorithm algorithm)
           
protected  void setupTriggers(Element algorithmElement, AbstractBaseAlgorithm algorithm)
           
protected  void setupTriggers(String fields, AbstractBaseAlgorithm algorithm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.forms.formmodel.CalculatedFieldAlgorithmBuilder
build
 

Field Detail

context

protected Context context
Constructor Detail

AbstractBaseAlgorithmBuilder

public AbstractBaseAlgorithmBuilder()
Method Detail

setup

protected void setup(Element algorithmElement,
                     AbstractBaseAlgorithm algorithm)
              throws Exception
Throws:
Exception

setupTriggers

protected void setupTriggers(Element algorithmElement,
                             AbstractBaseAlgorithm algorithm)
                      throws Exception
Throws:
Exception

setupTriggers

protected void setupTriggers(String fields,
                             AbstractBaseAlgorithm algorithm)

enableLogging

public void enableLogging(Logger logger)
Specified by:
enableLogging in interface LogEnabled

getLogger

protected Logger getLogger()

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

setupComponent

public void setupComponent(CalculatedFieldAlgorithm algorithm)
                    throws Exception
Throws:
Exception


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.