Class DefaultTmaOrderFacade

java.lang.Object
de.hybris.platform.commercefacades.order.impl.DefaultOrderFacade
de.hybris.platform.b2ctelcofacades.order.impl.DefaultTmaOrderFacade
All Implemented Interfaces:
TmaOrderFacade, de.hybris.platform.commercefacades.order.OrderFacade
Direct Known Subclasses:
DefaultTmaB2bOrderFacade

public class DefaultTmaOrderFacade extends de.hybris.platform.commercefacades.order.impl.DefaultOrderFacade implements TmaOrderFacade
Default implementation of TmaOrderFacade
Since:
2102
  • Constructor Details

  • Method Details

    • getOrderDetails

      public OrderData getOrderDetails(String code, String relatedPartyId)
      Description copied from interface: TmaOrderFacade
      Returns the details of an Order.
      Specified by:
      getOrderDetails in interface TmaOrderFacade
      Parameters:
      code - The id of the Order for which to retrieve the detail.
      relatedPartyId - The id of the customer who owns the order
      Returns:
      The detail of the order with matching code and relatedPartyId
    • getOrders

      public List<OrderData> getOrders(String principalId)
      Description copied from interface: TmaOrderFacade
      Provides the list of orders related to the principal provided by its id.
      Specified by:
      getOrders in interface TmaOrderFacade
      Parameters:
      principalId - The id of the principal having access to orders
      Returns:
      the list of orders related to the principal provided by its id
    • updateStatus

      public void updateStatus(String code, String principalId, String status) throws IllegalAccessException
      Description copied from interface: TmaOrderFacade
      Updates the status of the order.
      Specified by:
      updateStatus in interface TmaOrderFacade
      Parameters:
      code - The identifier of the order
      principalId - The identifier of the principal
      status - The new status
      Throws:
      IllegalAccessException - If the order status updated is not allowed
    • hasUserAccessToOrders

      public boolean hasUserAccessToOrders(String authenticatedUserId, String principalId)
      Description copied from interface: TmaOrderFacade
      Checks if authenticated user provided by its id is able to access any orders related to the principal provided by its id.
      Specified by:
      hasUserAccessToOrders in interface TmaOrderFacade
      Parameters:
      authenticatedUserId - The identifier of the authenticated user
      principalId - The identifier of the principal for which the request was made
      Returns:
      True if user can access orders related to the principal, false otherwise
    • canUserUpdateOrderStatus

      public boolean canUserUpdateOrderStatus(String principalId, String authenticatedUserId, String orderId)
      Description copied from interface: TmaOrderFacade
      Checks if a specific user can update the status of an order.
      Specified by:
      canUserUpdateOrderStatus in interface TmaOrderFacade
      Parameters:
      principalId - The owner of the order
      authenticatedUserId - The identifier of the authenticated user
      orderId - The identifier of the order
      Returns:
      True if authenticated user has the right to updated the status of the specified order, false otherwise
    • getOrdersByLimitAndOffset

      public List<OrderData> getOrdersByLimitAndOffset(TmaProductOrderFilterContextData productOrderFilterContextData, Integer offset, Integer limit)
      Description copied from interface: TmaOrderFacade
      Retrieves a list of product orders filtered by context
      Specified by:
      getOrdersByLimitAndOffset in interface TmaOrderFacade
      Parameters:
      productOrderFilterContextData - the context.
      offset - the offset represents the position in list from where the result list will start.
      limit - the limit represents the number of entries that will be selected for the result list.
      Returns:
      the list of product orders.
    • getNumberOfOrders

      public final Integer getNumberOfOrders(TmaProductOrderFilterContextData productOrderFilterContextData)
      Description copied from interface: TmaOrderFacade
      Retrieves the total number of product orders found for the given filtering context.
      Specified by:
      getNumberOfOrders in interface TmaOrderFacade
      Parameters:
      productOrderFilterContextData - the filtering context.
      Returns:
      the number of product orders.
    • getOrderForCode

      public OrderData getOrderForCode(String code)
      Description copied from interface: TmaOrderFacade
      Returns the details of an order.
      Specified by:
      getOrderForCode in interface TmaOrderFacade
      Parameters:
      code - The id of the order for which to retrieve the detail.
      Returns:
      The detail of the order with matching code.
    • getPrincipalService

      protected PrincipalService getPrincipalService()
    • getOrderService

      protected TmaOrderService getOrderService()