Interface RestServiceFacade<T extends CaptureRequestVO>

All Known Implementing Classes:
RestServiceFacadeImpl

public interface RestServiceFacade<T extends CaptureRequestVO>
A RestServiceFacade.
Author:
Heiko Scherrer
  • Method Details

    • capture

      @NotNull @NotNull Optional<ReceivingOrderVO> capture(@NotBlank @NotBlank String pKey, @NotNull @Valid @NotNull @Valid List<T> requests)
      Capturing on a ReceivingOrder means:
      • Decrease one of the ReceivingOrderPositions by the received amount of the given Product
      • Create physical PackagingUnit(s) from the received quantity
      Parameters:
      pKey - The persistent key of the ReceivingOrder
      requests - Contains all the capturing information according to the process in use
      Returns:
      The updated ReceivingOrder instance with updated positions
    • captureBlindReceipts

      void captureBlindReceipts(@NotNull @NotNull List<T> requests)
      Capture an unexpected receipt (aka Blind Receipt) that has no reference to a ReceivingOrder.
      • Create physical PackagingUnit(s) from the received quantity
      Parameters:
      requests - Contains all the capturing information according to the process in use
    • cancelOrder

      @NotNull @NotNull ReceivingOrderVO cancelOrder(@NotBlank @NotBlank String pKey)
      Cancel a ReceivingOrder.
      Parameters:
      pKey - The synthetic persistent key
      Returns:
      The cancelled instance
      Throws:
      CancellationDeniedException - in case the cancellation is not allowed
    • changeState

      @NotNull @NotNull ReceivingOrderVO changeState(@NotBlank @NotBlank String pKey, @NotNull @NotNull OrderState state)
      Change the state of a ReceivingOrder.
      Parameters:
      pKey - The synthetic persistent key
      state - The new state
      Returns:
      The updated instance
      Throws:
      CancellationDeniedException - in case the state change is not allowed
    • update

      @NotNull @NotNull ReceivingOrderVO update(@NotBlank @NotBlank String pKey, @NotNull @NotNull ReceivingOrderVO receivingOrder)
      Update an existing ReceivingOrder with the given data.
      Parameters:
      pKey - The synthetic persistent key
      receivingOrder - The representation to update
      Returns:
      The updated instance
      Throws:
      org.ameba.exception.NotFoundException - if not found
    • complete

      @NotNull @NotNull ReceivingOrderVO complete(@NotBlank @NotBlank String pKey)
      Complete a ReceivingOrder and all positions. Satisfy quantities and set the state to COMPLETED.
      Parameters:
      pKey - The synthetic persistent key
      Returns:
      The updated instance