org.apache.cocoon.components.pipeline.impl
Class PipelineComponentInfo

java.lang.Object
  extended byorg.apache.cocoon.components.pipeline.impl.PipelineComponentInfo

public class PipelineComponentInfo
extends Object

Holds informations defined in <map:components> such as default hint, labels and mime-types that are needed when building a processor and to manage inheritance when building child processors.

In previous versions of the sitemap engine, this information was stored in specialized extensions of ComponentSelector (SitemapComponentSelector and OutputComponentSelector), which led to a strong dependency on the chosen component container implementation. This is now a regular component that also "listens" to modifications of the service manager when it is built.

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

Field Summary
protected static String GENERATOR_PREFIX
           
protected  boolean locked
          Lock that prevents further modification
protected  PipelineComponentInfo parent
          Component info for the parent processor
protected static String READER_PREFIX
           
static String ROLE
          The role to lookup this component.
protected static String SERIALIZER_PREFIX
           
protected static String TRANSFORMER_PREFIX
           
 
Constructor Summary
PipelineComponentInfo(PipelineComponentInfo parent)
           
 
Method Summary
 void addData(Map map)
           
 void componentAdded(String role, String clazz, Configuration config)
          Grabs on the fly the sitemap-related information on generators, transformers, serializers and readers when they're declared in the ServiceManager.
 Map getData()
           
 String getDefaultType(String role)
           
 String[] getLabels(String role, String type)
           
 String getMimeType(String role, String type)
           
 String getPipelineHint(String role, String type)
           
 boolean hasLabel(String role, String type, String label)
           
 void lock()
          Lock this component info object at the end of processor building to prevent any further changes.
 void setData(Map map)
           
 void setDefaultType(String role, String hint)
           
 void setLabels(String role, String[] labels)
           
 void setMimeType(String role, String mimeType)
           
 void setPipelineHint(String role, String hint)
           
protected  void setupLabelAndPipelineHint(String role, Configuration config)
           
protected  void setupMimeType(String role, Configuration config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE

public static final String ROLE
The role to lookup this component.


GENERATOR_PREFIX

protected static final String GENERATOR_PREFIX

TRANSFORMER_PREFIX

protected static final String TRANSFORMER_PREFIX

SERIALIZER_PREFIX

protected static final String SERIALIZER_PREFIX

READER_PREFIX

protected static final String READER_PREFIX

parent

protected PipelineComponentInfo parent
Component info for the parent processor


locked

protected boolean locked
Lock that prevents further modification

Constructor Detail

PipelineComponentInfo

public PipelineComponentInfo(PipelineComponentInfo parent)
Method Detail

componentAdded

public void componentAdded(String role,
                           String clazz,
                           Configuration config)
Grabs on the fly the sitemap-related information on generators, transformers, serializers and readers when they're declared in the ServiceManager.

This method is triggered when a component is added on a CocoonServiceManager.

Parameters:
role - the component's role
clazz - the component's class
config - the component's configuration

setupLabelAndPipelineHint

protected void setupLabelAndPipelineHint(String role,
                                         Configuration config)

setupMimeType

protected void setupMimeType(String role,
                             Configuration config)

lock

public void lock()
Lock this component info object at the end of processor building to prevent any further changes.


setDefaultType

public void setDefaultType(String role,
                           String hint)

getDefaultType

public String getDefaultType(String role)

setPipelineHint

public void setPipelineHint(String role,
                            String hint)

getPipelineHint

public String getPipelineHint(String role,
                              String type)

setMimeType

public void setMimeType(String role,
                        String mimeType)

getMimeType

public String getMimeType(String role,
                          String type)

setLabels

public void setLabels(String role,
                      String[] labels)

getLabels

public String[] getLabels(String role,
                          String type)

hasLabel

public boolean hasLabel(String role,
                        String type,
                        String label)

getData

public Map getData()

setData

public void setData(Map map)

addData

public void addData(Map map)


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