|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.elementprocessor.impl.AbstractElementProcessorFactory
public abstract class AbstractElementProcessorFactory
Create instances of specific ElementProcessor implementations to handle specific XML elements and their content.
Field Summary |
---|
Fields inherited from interface org.apache.cocoon.components.elementprocessor.ElementProcessorFactory |
---|
ROLE |
Constructor Summary | |
---|---|
protected |
AbstractElementProcessorFactory()
Protected default constructor |
Method Summary | |
---|---|
protected void |
addElementProcessorProgenitor(String name,
Object progenitor)
A method for extending classes to populate the map. |
protected ElementProcessor |
constructElementProcessor(Constructor progenitor)
A reference implementation of doCreateElementProcessor that can be used by an extending class whose progenitors are Constructor objects that can create new instances of ElementProcessor implementations. |
ElementProcessor |
createElementProcessor(String name)
Given an XML element name, create and return an appropriate ElementProcessor. |
protected ElementProcessor |
createNewElementProcessorInstance(Class progenitor)
A reference implementation of doCreateElementProcessor that can be used by an extending class whose progenitors are Class objects for ElementProcessor implementations. |
protected abstract ElementProcessor |
doCreateElementProcessor(Object progenitor)
The method that a concrete extension of AbstractElementProcessorFactory must implement. |
protected Object |
lookupElementProcessorProgenitor(String name)
A method to get the progenitor value associated with a specified element name. |
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 |
Constructor Detail |
---|
protected AbstractElementProcessorFactory()
Method Detail |
---|
public ElementProcessor createElementProcessor(String name) throws CannotCreateElementProcessorException
createElementProcessor
in interface ElementProcessorFactory
name
- element name
CannotCreateElementProcessorException
- if there is no
ElementProcessor available for the specified nameprotected void addElementProcessorProgenitor(String name, Object progenitor)
name
- the element name for this progenitor; cannot be
null ot emptyprogenitor
- an object that can be used to generate an
appropriate ElementProcessor; cannot be nukk
IllegalArgumentException
- if name is already in the
map or progenitor is null.protected Object lookupElementProcessorProgenitor(String name)
name
- the element name
protected abstract ElementProcessor doCreateElementProcessor(Object progenitor) throws CannotCreateElementProcessorException
progenitor
- the object from which to create an
ElementProcessor
CannotCreateElementProcessorException
- if the
specified ElementProcessor cannot be created.protected ElementProcessor createNewElementProcessorInstance(Class progenitor) throws CannotCreateElementProcessorException
progenitor
- a Class representing an ElementProcessor
CannotCreateElementProcessorException
- if the
ElementProcessor cannot be created.protected ElementProcessor constructElementProcessor(Constructor progenitor) throws CannotCreateElementProcessorException
progenitor
- a Constructor of an ElementProcessor
CannotCreateElementProcessorException
- if the
ElementProcessor cannot be created.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |