org.apache.cocoon.portal.generation
Class AbstractCopletGenerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.ServiceableGenerator
org.apache.cocoon.portal.generation.AbstractCopletGenerator
- All Implemented Interfaces:
- Poolable, Recyclable, Disposable, Component, LogEnabled, Serviceable, Generator, SitemapModelComponent, XMLProducer
- Direct Known Subclasses:
- BasketContentGenerator
public abstract class AbstractCopletGenerator
- extends ServiceableGenerator
Abstract generator implementation that provides a method getCopletInstanceData().
There are two possibilities how the generator obtains the information required for
getting the coplet instance data:
1) If it is used within a coplet pipeline and this pipeline is called using the "cocoon:" protocol,
all required information are passed automatically.
2) Otherwise the portal name and the coplet id must be passed to the generator
as paremeters in the following way:
<map:generator type="coplet">
<map:parameter name="portalName" type="exampleportal"/>
<map:parameter name="copletId" type="examplecoplet"/>
</map:generator>
- Version:
- CVS $Id: AbstractCopletGenerator.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Carsten Ziegeler
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPLET_ID_PARAM
public static final String COPLET_ID_PARAM
- Parameter name.
- See Also:
- Constant Field Values
PORTAL_NAME_PARAM
public static final String PORTAL_NAME_PARAM
- Parameter name.
- See Also:
- Constant Field Values
portalService
protected PortalService portalService
- The portal service. @since 2.1.8
AbstractCopletGenerator
public AbstractCopletGenerator()
getCopletInstanceData
protected CopletInstanceData getCopletInstanceData()
throws SAXException
- Try to get the coplet instance data belonging to the current request
- Returns:
- The coplet instance data
- Throws:
SAXException
- If an errors occurs or the instance data is not available
getPortalService
protected PortalService getPortalService()
- Get the portal service
getCopletInstanceData
protected CopletInstanceData getCopletInstanceData(String copletId)
throws SAXException
- Try to get the coplet instance data with the given id
- Parameters:
copletId
- The id of the coplet instance or null if this transformer
is used inside a coplet pipeline
- Returns:
- The coplet instance data or null
- Throws:
SAXException
- If an error occurs
dispose
public void dispose()
- Description copied from class:
ServiceableGenerator
- Release all resources.
- Specified by:
dispose
in interface Disposable
- Overrides:
dispose
in class ServiceableGenerator
- See Also:
Disposable.dispose()
service
public void service(ServiceManager manager)
throws ServiceException
- Description copied from class:
ServiceableGenerator
- Set the current
ServiceManager
instance used by this
Serviceable
.
- Specified by:
service
in interface Serviceable
- Overrides:
service
in class ServiceableGenerator
- Throws:
ServiceException
- See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.