org.apache.cocoon.components.treeprocessor
Class ProcessorComponentInfo

java.lang.Object
  extended byorg.apache.cocoon.components.treeprocessor.ProcessorComponentInfo

public class ProcessorComponentInfo
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, these informations where store 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:
CVS $Id: ProcessorComponentInfo.java 157268 2005-03-12 19:17:13Z cziegeler $

Field Summary
static String ROLE
           
 
Constructor Summary
ProcessorComponentInfo(ProcessorComponentInfo parent)
           
 
Method Summary
 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.
 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 prepareConfig(String role, String clazz, Configuration config)
          Prepares the configuration for pooled sitemap components: Per default pooled components are proxied - we override this for generators, transformers, serializers, readers and pipes
 void roleAliased(String existingRole, String newRole)
           
 
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
Constructor Detail

ProcessorComponentInfo

public ProcessorComponentInfo(ProcessorComponentInfo 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

prepareConfig

public void prepareConfig(String role,
                          String clazz,
                          Configuration config)
Prepares the configuration for pooled sitemap components: Per default pooled components are proxied - we override this for generators, transformers, serializers, readers and pipes

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

roleAliased

public void roleAliased(String existingRole,
                        String newRole)

lock

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


getDefaultType

public String getDefaultType(String role)

getPipelineHint

public String getPipelineHint(String role,
                              String type)

getMimeType

public String getMimeType(String role,
                          String type)

getLabels

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

hasLabel

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


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.