Class ProcessOrderCancellationAction
- java.lang.Object
-
- de.hybris.platform.processengine.action.AbstractAction<OrderProcessModel>
-
- de.hybris.platform.yacceleratorordermanagement.actions.order.cancel.ProcessOrderCancellationAction
-
- All Implemented Interfaces:
Action<OrderProcessModel>
public class ProcessOrderCancellationAction extends AbstractAction<OrderProcessModel>
Creates the required events from the inventory when a cancellation is requested and process the cancellation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ProcessOrderCancellationAction.Transition
-
Field Summary
-
Fields inherited from class de.hybris.platform.processengine.action.AbstractAction
modelService, processParameterHelper
-
Fields inherited from interface de.hybris.platform.processengine.spring.Action
ERROR_RETURN_CODE, RETRY_RETURN_CODE
-
-
Constructor Summary
Constructors Constructor Description ProcessOrderCancellationAction()
-
Method Summary
-
Methods inherited from class de.hybris.platform.processengine.action.AbstractAction
createTransitions, getModelService, getProcessParameterHelper, getProcessParameterValue, refresh, save, setModelService, setOrderStatus, setProcessParameterHelper
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.processengine.spring.Action
getCurrentActionDefinitionContext
-
-
-
-
Method Detail
-
execute
public java.lang.String execute(OrderProcessModel process) throws java.lang.Exception
Description copied from interface:Action
Executes thisAction
's business logic working on the givenBusinessProcessModel
.- Parameters:
process
- The process context to work on.- Returns:
- the return code as stated in the process definition. This code is used by the process engine to determine the next actions.
- Throws:
java.lang.Exception
-
createOrderCancelResponseFromCancelRecordEntry
protected OrderCancelResponse createOrderCancelResponseFromCancelRecordEntry(OrderModel order, OrderCancelRecordEntryModel orderCancelRecordEntryModel)
Creates aOrderCancelResponse
from theOrderCancelRecordEntryModel
- Parameters:
order
-orderCancelRecordEntryModel
-- Returns:
- the created orderCancelResponse
-
extractResponseStatus
protected OrderCancelResponse.ResponseStatus extractResponseStatus(OrderCancelRecordEntryModel orderCancelRecordEntryModel)
- Parameters:
orderCancelRecordEntryModel
-- Returns:
- the responseStatus
-
getTransitions
public java.util.Set<java.lang.String> getTransitions()
Description copied from interface:Action
Accesses all possible return codes of thisAction
. This method is used by the process engine to validate a process definition. Furthermore it can be used by (graphical) editors to access all return codes which have to mapped in transitions.- Returns:
- all possible return codes of this
Action
-
getOrderCancelCallbackService
public OrderCancelCallbackService getOrderCancelCallbackService()
-
setOrderCancelCallbackService
public void setOrderCancelCallbackService(OrderCancelCallbackService orderCancelCallbackService)
-
getOrderCancelService
protected OrderCancelService getOrderCancelService()
-
setOrderCancelService
public void setOrderCancelService(OrderCancelService orderCancelService)
-
getCalculationService
protected CalculationService getCalculationService()
-
setCalculationService
public void setCalculationService(CalculationService calculationService)
-
getImpersonationService
protected ImpersonationService getImpersonationService()
-
setImpersonationService
public void setImpersonationService(ImpersonationService impersonationService)
-
getPromotionsService
protected PromotionsService getPromotionsService()
-
setPromotionsService
public void setPromotionsService(PromotionsService promotionsService)
-
getTimeService
protected TimeService getTimeService()
-
setTimeService
public void setTimeService(TimeService timeService)
-
-