public class GetCartElementsAction extends ServiceableAction
Cart
Modifier and Type | Field and Description |
---|---|
protected AmetysObjectResolver |
_resolver
The Ametys object resolver
|
protected UserHelper |
_userHelper
The user helper
|
protected UserManager |
_userManager
The user manager
|
protected CurrentUserProvider |
_userProvider
The current user provider
|
protected WorkflowHelper |
_workflowHelper
The workflow helper
|
protected WorkflowProvider |
_workflowProvider
The workflow
|
manager
EMPTY_MAP
Constructor and Description |
---|
GetCartElementsAction() |
Modifier and Type | Method and 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.
|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
protected List<Map<String,Object>> |
elementToJSON(CartElement elmt)
Gets a cart element to JSON format
|
void |
service(ServiceManager serviceManager) |
protected Map<String,Object> |
workflowStepToJSON(Content content)
Gets the workflow step if the content is a
WorkflowAwareContent |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected AmetysObjectResolver _resolver
protected WorkflowProvider _workflowProvider
protected WorkflowHelper _workflowHelper
protected CurrentUserProvider _userProvider
protected UserManager _userManager
protected UserHelper _userHelper
public GetCartElementsAction()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
Exception
protected List<Map<String,Object>> elementToJSON(CartElement elmt)
elmt
- The elemetntprotected Map<String,Object> workflowStepToJSON(Content content)
WorkflowAwareContent
content
- The contentprotected com.opensymphony.workflow.spi.Step _getCurrentStep(WorkflowAwareContent content, WorkflowProvider.AmetysObjectWorkflow workflow) throws com.opensymphony.workflow.WorkflowException
content
- the content.workflow
- the workflow instance bound to this contentcom.opensymphony.workflow.WorkflowException
- if an error occurs.