org.apache.cocoon.portal.coplets.basket
Class AddToBasketAspect

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
          extended by org.apache.cocoon.portal.coplets.basket.AddToBasketAspect
All Implemented Interfaces:
Disposable, Component, LogEnabled, Serviceable, ThreadSafe, RendererAspect

public final class AddToBasketAspect
extends AbstractAspect
implements Disposable

This renderer adds a link to add this coplet to the basket. It checks the coplet data for the attributes basket-content and basket-link (boolean values) to stream out the elements.

Version:
CVS $Id: AddToBasketAspect.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Field Summary
protected  BasketManager basketManager
          The basket manager
 
Fields inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
manager
 
Fields inherited from interface org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect
ROLE
 
Constructor Summary
AddToBasketAspect()
           
 
Method Summary
 void dispose()
           
 Object prepareConfiguration(Parameters configuration)
          Compile the configuration.
 void service(ServiceManager manager)
           
 void toSAX(RendererAspectContext context, Layout layout, PortalService service, ContentHandler contenthandler)
          Stream out raw layout
 
Methods inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
getAspectDescriptions, isRequired
 
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

basketManager

protected BasketManager basketManager
The basket manager

Constructor Detail

AddToBasketAspect

public AddToBasketAspect()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Overrides:
service in class AbstractAspect
Throws:
ServiceException

dispose

public void dispose()
Specified by:
dispose in interface Disposable

toSAX

public void toSAX(RendererAspectContext context,
                  Layout layout,
                  PortalService service,
                  ContentHandler contenthandler)
           throws SAXException
Description copied from interface: RendererAspect
Stream out raw layout

Specified by:
toSAX in interface RendererAspect
Overrides:
toSAX in class AbstractAspect
Throws:
SAXException

prepareConfiguration

public Object prepareConfiguration(Parameters configuration)
                            throws ParameterException
Description copied from interface: RendererAspect
Compile the configuration. A renderer aspect can "compile" the configuration in order to increase performance. If the renderer does not want to compile it should simply return the configuration. The "compiled" configuration is passed to the RendererAspect.getAspectDescriptions(Object) method and is available during streaming via the context object. This method can also be used for validation the configuration.

Specified by:
prepareConfiguration in interface RendererAspect
Overrides:
prepareConfiguration in class AbstractAspect
Throws:
ParameterException


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.