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
public class GetCartElementsAction extends ServiceableAction
SAX aCart 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver_resolverThe Ametys object resolverprotected UserHelper_userHelperThe user helperprotected UserManager_userManagerThe user managerprotected CurrentUserProvider_userProviderThe current user providerprotected WorkflowHelper_workflowHelperThe workflow helperprotected WorkflowProvider_workflowProviderThe workflow- 
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager 
- 
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP 
 - 
 
- 
Constructor Summary
Constructors Constructor Description GetCartElementsAction() 
- 
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.Mapact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)protected List<Map<String,Object>>elementToJSON(CartElement elmt)Gets a cart element to JSON formatvoidservice(ServiceManager serviceManager)protected Map<String,Object>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 Detail
- 
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver 
- 
_workflowProvider
protected WorkflowProvider _workflowProvider
The workflow 
- 
_workflowHelper
protected WorkflowHelper _workflowHelper
The workflow helper 
- 
_userProvider
protected CurrentUserProvider _userProvider
The current user provider 
- 
_userManager
protected UserManager _userManager
The user manager 
- 
_userHelper
protected UserHelper _userHelper
The user helper 
 - 
 
- 
Constructor Detail
- 
GetCartElementsAction
public GetCartElementsAction()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classServiceableAction- Throws:
 ServiceException
 
- 
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
- Throws:
 Exception
 
- 
elementToJSON
protected List<Map<String,Object>> elementToJSON(CartElement elmt)
Gets a cart element to JSON format- Parameters:
 elmt- The elemetnt- Returns:
 - The element's properties
 
 
- 
workflowStepToJSON
protected Map<String,Object> workflowStepToJSON(Content content)
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.
 
 - 
 
 -