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
SAX a
Cart
-
Field Summary
Modifier and TypeFieldDescriptionprotected CartsDAO
The carts DAOprotected AmetysObjectResolver
The Ametys object resolverprotected UserManager
The user managerprotected CurrentUserProvider
The current user providerprotected WorkflowHelper
The workflow helperprotected WorkflowProvider
The workflow providerFields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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 aWorkflowAwareContent
void
generate()
void
service
(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 Details
-
_resolver
The Ametys object resolver -
_workflowProvider
The workflow provider -
_workflowHelper
The workflow helper -
_userProvider
The current user provider -
_userManager
The user manager -
_cartsDAO
The carts DAO
-
-
Constructor Details
-
CartElementsGenerator
public CartElementsGenerator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
generate
-
_saxElement
SAX an element of the cart- Parameters:
elmt
- The element to SAX- Throws:
SAXException
- if something goes wrong when saxing the element
-
_saxWorkflowStep
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.
-