org.apache.cocoon.components.treeprocessor.sitemap
Class ComponentsSelector
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.apache.avalon.excalibur.component.AbstractDualLogEnabled
|
+--org.apache.avalon.excalibur.component.ExcaliburComponentSelector
|
+--org.apache.cocoon.components.ExtendedComponentSelector
|
+--org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.ComponentSelector, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.excalibur.instrument.Instrumentable, org.apache.excalibur.instrument.InstrumentManageable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.logger.LogKitManageable, OutputComponentSelector, org.apache.avalon.excalibur.component.RoleManageable, SitemapComponentSelector, org.apache.avalon.framework.thread.ThreadSafe
- public class ComponentsSelector
- extends ExtendedComponentSelector
- implements OutputComponentSelector, SitemapComponentSelector
Component selector for sitemap components.
- Version:
- CVS $Id: ComponentsSelector.java,v 1.1.2.2 2002/11/25 21:51:59 sylvain Exp $
- Author:
- Sylvain Wallez
Fields inherited from class org.apache.avalon.excalibur.component.ExcaliburComponentSelector |
m_context |
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable |
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY |
Method Summary |
void |
addComponent(java.lang.Object hint,
java.lang.Class clazz,
org.apache.avalon.framework.configuration.Configuration config)
Add a component in this selector. |
void |
configure(org.apache.avalon.framework.configuration.Configuration config)
Configure this selector. |
protected java.lang.String |
getClassAttributeName()
Get the attribute for class names. |
protected java.lang.String |
getComponentInstanceName()
Return the component instance name according to the selector role
(e.g. |
java.lang.String[] |
getLabels(java.lang.Object hint)
|
java.lang.String |
getMimeTypeForHint(java.lang.Object hint)
Get the MIME type for a given hint. |
boolean |
hasLabel(java.lang.Object hint,
java.lang.String label)
|
void |
initialize()
Ensure system-defined components exist (e.g. |
void |
setParentSelector(org.apache.avalon.framework.component.ComponentSelector selector)
Set the parent of this selector. |
Methods inherited from class org.apache.avalon.excalibur.component.ExcaliburComponentSelector |
addComponentInstance, compose, contextualize, dispose, getChildInstrumentables, getComponentHandler, getComponentHandlers, getInstrumentableName, getInstruments, setInstrumentableName, setInstrumentManager, setLoggerManager, setLogKitManager |
Methods inherited from class org.apache.avalon.excalibur.component.AbstractDualLogEnabled |
getLogkitLogger, setLogger |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.avalon.framework.component.ComponentSelector |
hasComponent, release, select |
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
GENERATOR
public static final int GENERATOR
- See Also:
- Constant Field Values
TRANSFORMER
public static final int TRANSFORMER
- See Also:
- Constant Field Values
SERIALIZER
public static final int SERIALIZER
- See Also:
- Constant Field Values
READER
public static final int READER
- See Also:
- Constant Field Values
MATCHER
public static final int MATCHER
- See Also:
- Constant Field Values
SELECTOR
public static final int SELECTOR
- See Also:
- Constant Field Values
ACTION
public static final int ACTION
- See Also:
- Constant Field Values
SELECTOR_ROLES
public static final java.lang.String[] SELECTOR_ROLES
COMPONENT_NAMES
public static final java.lang.String[] COMPONENT_NAMES
ComponentsSelector
public ComponentsSelector()
setParentSelector
public void setParentSelector(org.apache.avalon.framework.component.ComponentSelector selector)
- Description copied from class:
ExtendedComponentSelector
- Set the parent of this selector. This can be done after the selector is
initialized, but only once. This allows this selector to be
created by a component manager while still being able to have a parent.
- Overrides:
setParentSelector
in class ExtendedComponentSelector
- Parameters:
selector
- the parent selector
getComponentInstanceName
protected java.lang.String getComponentInstanceName()
- Return the component instance name according to the selector role
(e.g. "action" for "org.apache.cocoon.acting.Action").
- Overrides:
getComponentInstanceName
in class ExtendedComponentSelector
- Returns:
null
, but can be changed by subclasses
getClassAttributeName
protected java.lang.String getClassAttributeName()
- Get the attribute for class names. This is "src" for known roles, and
"class" (the default) for other roles.
- Overrides:
getClassAttributeName
in class ExtendedComponentSelector
- Returns:
- "
class
", but can be changed by subclasses
configure
public void configure(org.apache.avalon.framework.configuration.Configuration config)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Description copied from class:
ExtendedComponentSelector
- Configure this selector. This is the main difference with the parent class :
addComponent
public void addComponent(java.lang.Object hint,
java.lang.Class clazz,
org.apache.avalon.framework.configuration.Configuration config)
throws org.apache.avalon.framework.component.ComponentException
- Add a component in this selector. If needed, also register it's MIME type.
- Overrides:
addComponent
in class org.apache.avalon.excalibur.component.ExcaliburComponentSelector
org.apache.avalon.framework.component.ComponentException
initialize
public void initialize()
- Ensure system-defined components exist (e.g. <aggregator>) and initialize
the selector.
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
- Overrides:
initialize
in class org.apache.avalon.excalibur.component.ExcaliburComponentSelector
getMimeTypeForHint
public java.lang.String getMimeTypeForHint(java.lang.Object hint)
- Get the MIME type for a given hint.
- Specified by:
getMimeTypeForHint
in interface OutputComponentSelector
- Parameters:
hint
- the component hint
- Returns:
- the MIME type for this hint, or
null
.
hasLabel
public boolean hasLabel(java.lang.Object hint,
java.lang.String label)
- Specified by:
hasLabel
in interface SitemapComponentSelector
getLabels
public java.lang.String[] getLabels(java.lang.Object hint)
- Specified by:
getLabels
in interface SitemapComponentSelector
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.