Class CartElementsGenerator
- 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.ametys.plugins.cart.generators.CartElementsGenerator
-
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
public class CartElementsGenerator extends ServiceableGenerator
SAX aCart
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver_resolverThe Ametys object resolverprotected UserManager_userManagerThe user managerprotected CurrentUserProvider_userProviderThe current user providerprotected WorkflowHelper_workflowHelperThe workflow helperprotected WorkflowProvider_workflowProviderThe workflow provider-
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
-
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
-
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
-
Constructor Summary
Constructors Constructor Description CartElementsGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.opensymphony.workflow.spi.Step_getCurrentStep(WorkflowAwareContent content, WorkflowProvider.AmetysObjectWorkflow workflow)Get a content's step, wherever it works on the base version or not.protected void_saxElement(CartElement elmt)SAX an element of the cartprotected void_saxWorkflowStep(Content content)SAX the workflow step if the content is aWorkflowAwareContentvoidgenerate()voidservice(ServiceManager smanager)-
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
-
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
-
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
-
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.cocoon.xml.XMLProducer
setConsumer
-
-
-
-
Field Detail
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver
-
_workflowProvider
protected WorkflowProvider _workflowProvider
The workflow provider
-
_workflowHelper
protected WorkflowHelper _workflowHelper
The workflow helper
-
_userProvider
protected CurrentUserProvider _userProvider
The current user provider
-
_userManager
protected UserManager _userManager
The user manager
-
-
Constructor Detail
-
CartElementsGenerator
public CartElementsGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classServiceableGenerator- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
_saxElement
protected void _saxElement(CartElement elmt) throws SAXException
SAX an element of the cart- Parameters:
elmt- The element to SAX- Throws:
SAXException- if something goes wrong when saxing the element
-
_saxWorkflowStep
protected void _saxWorkflowStep(Content content) throws SAXException
SAX the workflow step if the content is aWorkflowAwareContent- Parameters:
content- The content- Throws:
SAXException- if an error occurs while SAXing.
-
_getCurrentStep
protected com.opensymphony.workflow.spi.Step _getCurrentStep(WorkflowAwareContent content, WorkflowProvider.AmetysObjectWorkflow workflow) throws com.opensymphony.workflow.WorkflowException
Get a content's step, wherever it works on the base version or not.- Parameters:
content- the content.workflow- the workflow instance bound to this content- Returns:
- the content's workflow step.
- Throws:
com.opensymphony.workflow.WorkflowException- if an error occurs.
-
-