org.apache.cocoon.sitemap
Interface SitemapModelComponent

All Known Subinterfaces:
Generator, Reader, Transformer

public interface SitemapModelComponent

The SitemapModelComponent identifies the contract between the Sitemap and your pipeline components that create or transform information. The types of components that fit within this umbrella are your Generators, Transformers, and your Readers. It is very important to note that all components impementing this interface must be pooled or created on demand. This is due to the separation between the setup and the execution. If you don't ensure every instance of the component is unique within a pipeline, or accross pipelines, then the setup process will start killing all the other setups and you will end up with serious race conditions. It's not that they need synchronized keywords applied to the methods, its that the methods have to be called in a certain order. This is by design. If you really think about it, due to the SAX infrastructure we would still need to keep them synchronized because the order of SAX events affects the validity of your XML document.

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

Method Summary
 void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
          The Sitemap will call the setup() method to prepare the component for use.
 

Method Detail

setup

public void setup(SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters par)
           throws ProcessingException,
                  SAXException,
                  IOException
The Sitemap will call the setup() method to prepare the component for use. This is where you start the process of getting your information ready to generate your results. See ObjectModelHelper for help with the objectModel.

Parameters:
resolver - The SourceResolver to find resources within your context.
objectModel - A java.util.Map that contains the request and session information.
src - The value of the "src" attribute in the sitemap.
par - The sitemap parameters passed into your component.
Throws:
SAXException - if there is a problem reading a SAX stream.
IOException - if there is a problem reading files.
ProcessingException - if there is any other unexpected problem.


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