Package org.ametys.plugins.cart.actions
Class GetCartElementsAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.cart.actions.GetCartElementsAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
SAX a
Cart
-
Field Summary
Modifier and TypeFieldDescriptionprotected CartsDAO
The carts DAOprotected QueryDAO
The query DAOprotected AmetysObjectResolver
The Ametys object resolverprotected UserHelper
The user helperprotected UserManager
The user managerprotected CurrentUserProvider
The current user providerprotected WorkflowHelper
The workflow helperprotected WorkflowProvider
The workflowFields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
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.act
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) elementToJSON
(CartElement elmt) Gets a cart element to JSON formatvoid
service
(ServiceManager serviceManager) workflowStepToJSON
(Content content) Gets the workflow step if the content is aWorkflowAwareContent
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_resolver
The Ametys object resolver -
_workflowProvider
The workflow -
_workflowHelper
The workflow helper -
_userProvider
The current user provider -
_userManager
The user manager -
_userHelper
The user helper -
_cartsDAO
The carts DAO -
_queryDAO
The query DAO
-
-
Constructor Details
-
GetCartElementsAction
public GetCartElementsAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception - Throws:
Exception
-
elementToJSON
Gets a cart element to JSON format- Parameters:
elmt
- The elemetnt- Returns:
- The element's properties
-
workflowStepToJSON
Gets the workflow step if the content is aWorkflowAwareContent
- Parameters:
content
- The content- Returns:
- The workflow step's properties
-
_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.
-