|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
An extension of ExcaliburComponentSelector
that can have a parent
and accepts a wider variety of configurations.
Field Summary | |
protected java.lang.ClassLoader |
classLoader
The class loader to use |
protected java.lang.String |
defaultHint
The default hint |
protected java.util.Set |
parentComponents
The components selected in the parent selector |
protected org.apache.avalon.framework.component.ComponentSelector |
parentSelector
The parent selector, if any |
protected java.lang.String |
roleName
The role of this selector. |
protected org.apache.avalon.excalibur.component.RoleManager |
roles
The role manager |
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 |
Constructor Summary | |
ExtendedComponentSelector()
|
|
ExtendedComponentSelector(java.lang.ClassLoader loader)
Create the ComponentSelector with a Classloader |
Method Summary | |
void |
configure(org.apache.avalon.framework.configuration.Configuration config)
Configure this selector. |
protected java.lang.String |
getClassAttributeName()
Get the name of the attribute giving the class name of a component. |
protected java.lang.String |
getComponentInstanceName()
Get the name for component-instance elements (i.e. components not defined by their role shortcut. |
java.lang.String |
getDefaultHint()
Get the default hint, if any for this selector. |
protected java.lang.String |
getDefaultHintAttributeName()
Get the name of the attribute giving the default hint to use if none is given. |
protected java.lang.String |
getRoleName(org.apache.avalon.framework.configuration.Configuration config)
Get the role name for this selector. |
boolean |
hasComponent(java.lang.Object hint)
|
void |
release(org.apache.avalon.framework.component.Component component)
|
org.apache.avalon.framework.component.Component |
select(java.lang.Object hint)
|
void |
setParentSelector(org.apache.avalon.framework.component.ComponentSelector parent)
Set the parent of this selector. |
void |
setRoleManager(org.apache.avalon.excalibur.component.RoleManager roles)
Configure the RoleManager. |
Methods inherited from class org.apache.avalon.excalibur.component.ExcaliburComponentSelector |
addComponent, addComponentInstance, compose, contextualize, dispose, getChildInstrumentables, getComponentHandler, getComponentHandlers, getInstrumentableName, getInstruments, initialize, 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 |
Field Detail |
protected org.apache.avalon.excalibur.component.RoleManager roles
protected org.apache.avalon.framework.component.ComponentSelector parentSelector
protected java.lang.ClassLoader classLoader
protected java.util.Set parentComponents
protected java.lang.String roleName
configure()
.protected java.lang.String defaultHint
Constructor Detail |
public ExtendedComponentSelector()
public ExtendedComponentSelector(java.lang.ClassLoader loader)
Method Detail |
protected java.lang.String getComponentInstanceName()
null
, any element having a 'class'
attribute will be considered as a component instance.
The default here is to return null
, and subclasses can redefine
this method to return particular values.
null
, but can be changed by subclassesprotected java.lang.String getClassAttributeName()
class
", but can be changed by subclassesprotected java.lang.String getDefaultHintAttributeName()
null
,
no default hint can be specified.default
", but can be changed by subclassespublic void setRoleManager(org.apache.avalon.excalibur.component.RoleManager roles)
setRoleManager
in class org.apache.avalon.excalibur.component.ExcaliburComponentSelector
public void setParentSelector(org.apache.avalon.framework.component.ComponentSelector parent)
parent
- the parent selectorjava.lang.IllegalStateException
- if parent is already setprotected java.lang.String getRoleName(org.apache.avalon.framework.configuration.Configuration config)
configure()
to set the value of this.roleName
.null if it couldn't be determined.
public void configure(org.apache.avalon.framework.configuration.Configuration config) throws org.apache.avalon.framework.configuration.ConfigurationException
getComponentInstanceName()
returns null
,
any child configurations having a attribute named as the result of
getClassAttributeName()
, is considered as a component instance.
getComponentInstanceName()
returns a non-null value,
only child configurations having this name are considered as a
component instance.
ExcaliburComponentSelector
.
configure
in class org.apache.avalon.excalibur.component.ExcaliburComponentSelector
config
- the configurationorg.apache.avalon.framework.configuration.ConfigurationException
- if some hints aren't definedpublic java.lang.String getDefaultHint()
public org.apache.avalon.framework.component.Component select(java.lang.Object hint) throws org.apache.avalon.framework.component.ComponentException
select
in class org.apache.avalon.excalibur.component.ExcaliburComponentSelector
public void release(org.apache.avalon.framework.component.Component component)
release
in class org.apache.avalon.excalibur.component.ExcaliburComponentSelector
public boolean hasComponent(java.lang.Object hint)
hasComponent
in class org.apache.avalon.excalibur.component.ExcaliburComponentSelector
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |