cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <Robby.Pelss...@nxp.com>
Subject question regarding the Cocoon 3 API
Date Thu, 07 Jul 2011 10:09:53 GMT
Hi,

Are my following assumptions right?


-          setConfiguration is typically used when using sitemap

-          but for setup(params) method the API states that this is the shared map for all
components... so it should not be called directly

but it gets indirectly called when executing pipeline.setup(outputstream, params)?



If it was not intended this way, then https://issues.apache.org/jira/browse/COCOON3-68 applies.



-          But I still can see the need that different components need to be able to be  setup
with different maps of parameters. Suppose both components need a "id" parameter but for
the generator this needs to be value 'x' and for e.g. the transformer value 'y'. Then using
a shared map will not work.


Kind regards,
Robby






public interface PipelineComponent {

    /**
     * This method is called after pipeline run - regardless if the run was
     * successful or an exception was thrown.
     */
    void finish();

    /**
     * Pass component specific configuration parameters to the pipeline
     * component in a generic way. This is useful in environments that
     * automatically assemble pipelines with their components and can't use the
     * components constructors or setters.
     *
     * @param configuration The {@link Map} of configuration parameters.
     */
    void setConfiguration(Map<String, ? extends Object> configuration);

    /**
     * The shared object map for this pipeline run.
     *
     * @param parameters A {@link Map} of parameters that are available to all
     *            {@link PipelineComponent}s. This is a modifiable map that can
     *            be changed by this pipeline component.
     */
    void setup(Map<String, Object> parameters);
}

Mime
View raw message