Class UpdateConsignmentStatusAction
java.lang.Object
de.hybris.platform.processengine.action.AbstractAction<T>
de.hybris.platform.processengine.action.AbstractProceduralAction<OrderProcessModel>
de.hybris.platform.travelfulfilmentprocess.actions.consignment.UpdateConsignmentStatusAction
- All Implemented Interfaces:
de.hybris.platform.processengine.spring.Action<OrderProcessModel>
- Direct Known Subclasses:
OneOrderUpdateConsignmentStatusAction
public class UpdateConsignmentStatusAction
extends de.hybris.platform.processengine.action.AbstractProceduralAction<OrderProcessModel>
The type Update consignment status action.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.processengine.action.AbstractProceduralAction
de.hybris.platform.processengine.action.AbstractProceduralAction.Transition -
Field Summary
Fields inherited from class de.hybris.platform.processengine.action.AbstractAction
modelService, processParameterHelperFields inherited from interface de.hybris.platform.processengine.spring.Action
ERROR_RETURN_CODE, RETRY_RETURN_CODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloneOrderConsignments(OrderModel originalOrder, OrderModel snapshot) Creates deep copy of consignment and consignment entries from original order to snapshotprotected OrderHistoryEntryModelcreateNewOrderHistoryEntry(OrderModel originalOrder, OrderModel newOrder) Creates a snapshot of the original order and attaches it to a newly created order history entry for new ordervoidexecuteAction(OrderProcessModel orderProcess) protected de.hybris.platform.commerceservices.customer.CustomerAccountServiceGets customer account service.protected de.hybris.platform.orderhistory.OrderHistoryServiceGets order history service.protected de.hybris.platform.servicelayer.time.TimeServiceGets time service.protected voidpopulateOriginalOrderEntry(OrderModel snapshot, OrderModel newOrder) Populates original order entry for the order entries in the new order from the snapshot.voidsetCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService) Sets customer account service.voidsetOrderHistoryService(de.hybris.platform.orderhistory.OrderHistoryService orderHistoryService) Sets order history service.voidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Sets time service.protected voidupdateConsignmentsStatus(OrderModel newOrder, OrderModel originalOrder) Update consignments status.protected voidupdateTravellersID(OrderModel orderModel) Updates theTravellerModelinside theTravelOrderEntryInfoModelto set a version id consistent with the providedOrderModelMethods inherited from class de.hybris.platform.processengine.action.AbstractProceduralAction
execute, getTransitionsMethods inherited from class de.hybris.platform.processengine.action.AbstractAction
createTransitions, getModelService, getProcessParameterHelper, getProcessParameterValue, refresh, save, setModelService, setOrderStatus, setProcessParameterHelperMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.processengine.spring.Action
getCurrentActionDefinitionContext
-
Constructor Details
-
UpdateConsignmentStatusAction
public UpdateConsignmentStatusAction()
-
-
Method Details
-
executeAction
public void executeAction(OrderProcessModel orderProcess) throws de.hybris.platform.task.RetryLaterException, Exception - Specified by:
executeActionin classde.hybris.platform.processengine.action.AbstractProceduralAction<OrderProcessModel>- Throws:
de.hybris.platform.task.RetryLaterExceptionException
-
createNewOrderHistoryEntry
protected OrderHistoryEntryModel createNewOrderHistoryEntry(OrderModel originalOrder, OrderModel newOrder) Creates a snapshot of the original order and attaches it to a newly created order history entry for new order- Parameters:
originalOrder- the original ordernewOrder- the new order- Returns:
- history entry which contains snapshot of the original order
-
populateOriginalOrderEntry
Populates original order entry for the order entries in the new order from the snapshot. Checks if the order entry in the snapshot has the original order entry, if found set the order entry otherwise set the entry in the snapshot as the original order entry- Parameters:
snapshot- the snapshotnewOrder- the new order
-
updateTravellersID
Updates theTravellerModelinside theTravelOrderEntryInfoModelto set a version id consistent with the providedOrderModel- Parameters:
orderModel- the order model
-
cloneOrderConsignments
Creates deep copy of consignment and consignment entries from original order to snapshot- Parameters:
originalOrder- the original ordersnapshot- the new order
-
updateConsignmentsStatus
Update consignments status.- Parameters:
newOrder- the new orderoriginalOrder- the original order
-
getCustomerAccountService
protected de.hybris.platform.commerceservices.customer.CustomerAccountService getCustomerAccountService()Gets customer account service.- Returns:
- the customerAccountService
-
setCustomerAccountService
public void setCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService) Sets customer account service.- Parameters:
customerAccountService- the customerAccountService to set
-
getOrderHistoryService
protected de.hybris.platform.orderhistory.OrderHistoryService getOrderHistoryService()Gets order history service.- Returns:
- the orderHistoryService
-
setOrderHistoryService
public void setOrderHistoryService(de.hybris.platform.orderhistory.OrderHistoryService orderHistoryService) Sets order history service.- Parameters:
orderHistoryService- the orderHistoryService to set
-
getTimeService
protected de.hybris.platform.servicelayer.time.TimeService getTimeService()Gets time service.- Returns:
- timeService time service
-
setTimeService
public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Sets time service.- Parameters:
timeService- the timeService to set
-