org.apache.cocoon.components.treeprocessor.sitemap
Class ErrorHandlerHelper

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper
All Implemented Interfaces:
Serviceable

public class ErrorHandlerHelper
extends org.apache.cocoon.util.AbstractLogEnabled
implements Serviceable

Helps to call error handlers from PipelineNode and PipelinesNode.

Version:
$Id: ErrorHandlerHelper.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  Log handledErrorsLogger
          Logger for handled errors
 
Constructor Summary
ErrorHandlerHelper()
           
 
Method Summary
 boolean invokeErrorHandler(Exception ex, org.apache.cocoon.environment.Environment env, InvokeContext context)
          Handle error.
 boolean isEmpty()
           
 boolean isExternal()
           
 boolean isInternal()
           
 org.apache.cocoon.Processor.InternalPipelineDescription prepareErrorHandler(Exception ex, org.apache.cocoon.environment.Environment env, InvokeContext context)
          Prepare error handler for the internal pipeline error handling.
 void service(ServiceManager manager)
          The component manager is used to create notifying builders.
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handledErrorsLogger

protected Log handledErrorsLogger
Logger for handled errors

Constructor Detail

ErrorHandlerHelper

public ErrorHandlerHelper()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
The component manager is used to create notifying builders.

Specified by:
service in interface Serviceable
Throws:
ServiceException

isEmpty

public boolean isEmpty()
Returns:
true if has no error handler nodes set

isInternal

public boolean isInternal()

isExternal

public boolean isExternal()

invokeErrorHandler

public boolean invokeErrorHandler(Exception ex,
                                  org.apache.cocoon.environment.Environment env,
                                  InvokeContext context)
                           throws Exception
Handle error.

Throws:
Exception

prepareErrorHandler

public org.apache.cocoon.Processor.InternalPipelineDescription prepareErrorHandler(Exception ex,
                                                                                   org.apache.cocoon.environment.Environment env,
                                                                                   InvokeContext context)
                                                                            throws Exception
Prepare error handler for the internal pipeline error handling.

If building pipeline only, error handling pipeline will be built and returned. If building and executing pipeline, error handling pipeline will be built and executed.

Throws:
Exception


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.