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, processParameterHelper

    Fields inherited from interface de.hybris.platform.processengine.spring.Action

    ERROR_RETURN_CODE, RETRY_RETURN_CODE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    cloneOrderConsignments(OrderModel originalOrder, OrderModel snapshot)
    Creates deep copy of consignment and consignment entries from original order to snapshot
    Creates a snapshot of the original order and attaches it to a newly created order history entry for new order
    void
     
    protected de.hybris.platform.commerceservices.customer.CustomerAccountService
    Gets customer account service.
    protected de.hybris.platform.orderhistory.OrderHistoryService
    Gets order history service.
    protected de.hybris.platform.servicelayer.time.TimeService
    Gets time service.
    protected void
    Populates original order entry for the order entries in the new order from the snapshot.
    void
    setCustomerAccountService(de.hybris.platform.commerceservices.customer.CustomerAccountService customerAccountService)
    Sets customer account service.
    void
    setOrderHistoryService(de.hybris.platform.orderhistory.OrderHistoryService orderHistoryService)
    Sets order history service.
    void
    setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
    Sets time service.
    protected void
    Update consignments status.
    protected void
    Updates the TravellerModel inside the TravelOrderEntryInfoModel to set a version id consistent with the provided OrderModel

    Methods inherited from class de.hybris.platform.processengine.action.AbstractProceduralAction

    execute, getTransitions

    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
  • Constructor Details

    • UpdateConsignmentStatusAction

      public UpdateConsignmentStatusAction()
  • Method Details

    • executeAction

      public void executeAction(OrderProcessModel orderProcess) throws de.hybris.platform.task.RetryLaterException, Exception
      Specified by:
      executeAction in class de.hybris.platform.processengine.action.AbstractProceduralAction<OrderProcessModel>
      Throws:
      de.hybris.platform.task.RetryLaterException
      Exception
    • 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 order
      newOrder - the new order
      Returns:
      history entry which contains snapshot of the original order
    • populateOriginalOrderEntry

      protected void populateOriginalOrderEntry(OrderModel snapshot, OrderModel newOrder)
      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 snapshot
      newOrder - the new order
    • updateTravellersID

      protected void updateTravellersID(OrderModel orderModel)
      Updates the TravellerModel inside the TravelOrderEntryInfoModel to set a version id consistent with the provided OrderModel
      Parameters:
      orderModel - the order model
    • cloneOrderConsignments

      protected void cloneOrderConsignments(OrderModel originalOrder, OrderModel snapshot)
      Creates deep copy of consignment and consignment entries from original order to snapshot
      Parameters:
      originalOrder - the original order
      snapshot - the new order
    • updateConsignmentsStatus

      protected void updateConsignmentsStatus(OrderModel newOrder, OrderModel originalOrder)
      Update consignments status.
      Parameters:
      newOrder - the new order
      originalOrder - 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