org.apache.cocoon
Interface Processor


public interface Processor

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

Nested Class Summary
static class Processor.InternalPipelineDescription
          Keeps together processing pipeline, its owners, and environment state variables.
 
Field Summary
static String ROLE
          The role of the root processor
 
Method Summary
 Processor.InternalPipelineDescription buildPipeline(org.apache.cocoon.environment.Environment environment)
          Process the given Environment to assemble a ProcessingPipeline.
 Object getAttribute(String name)
          Gets an attribute
 String getContext()
          Get the context URI for this processor
 Processor getParent()
          Get the parent processor (if any).
 Processor getRootProcessor()
          Get the root processor parent of this processor.
 org.apache.cocoon.environment.SourceResolver getSourceResolver()
          Get the source resolver for this processor
 boolean process(org.apache.cocoon.environment.Environment environment)
          Process the given Environment producing the output.
 Object removeAttribute(String name)
          Remove an attribute.
 void setAttribute(String name, Object value)
          Sets an attribute
 

Field Detail

ROLE

public static final String ROLE
The role of the root processor

Method Detail

process

public boolean process(org.apache.cocoon.environment.Environment environment)
                throws Exception
Process the given Environment producing the output.

Returns:
If the processing is successfull true is returned. If no match is found in the sitemap false is returned.
Throws:
ResourceNotFoundException - If a sitemap component tries to access a resource which can not be found, e.g. the generator ConnectionResetException If the connection was reset
Exception

buildPipeline

public Processor.InternalPipelineDescription buildPipeline(org.apache.cocoon.environment.Environment environment)
                                                    throws Exception
Process the given Environment to assemble a ProcessingPipeline. Don't forget to release the pipeline using Processor.InternalPipelineDescription.release().

Throws:
Exception
Since:
2.2

getRootProcessor

public Processor getRootProcessor()
Get the root processor parent of this processor.

Since:
2.1.1

getSourceResolver

public org.apache.cocoon.environment.SourceResolver getSourceResolver()
Get the source resolver for this processor

Since:
2.2

getContext

public String getContext()
Get the context URI for this processor

Since:
2.2

setAttribute

public void setAttribute(String name,
                         Object value)
Sets an attribute

Since:
2.2

getAttribute

public Object getAttribute(String name)
Gets an attribute

Since:
2.2

removeAttribute

public Object removeAttribute(String name)
Remove an attribute.

Since:
2.2

getParent

public Processor getParent()
Get the parent processor (if any).

Returns:
The parent processor or null.
Since:
2.2


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