Interface MovementService

All Known Implementing Classes:
MovementServiceImpl

public interface MovementService
A MovementService is the internal service API that deals with Movements.
Author:
Heiko Scherrer
  • Method Details

    • create

      @NotNull @NotNull MovementVO create(@NotBlank(groups=Create.class) @NotBlank(groups=Create.class) String bk, @NotNull(groups=Create.class) @Valid @NotNull(groups=Create.class) @Valid MovementVO movement)
      Create a new Movement for a TransportUnit.
      Parameters:
      bk - The identifying business key of the TransportUnit to move
      movement - Detailed Movement information
      Returns:
      The created Movement instance
    • findFor

      List<MovementVO> findFor(@NotNull @NotNull MovementState state, @NotBlank @NotBlank String source, @NotEmpty @NotEmpty MovementType... types)
      Find and return Movements in the given state and of one of the types.
      Parameters:
      state - The state the Movement is in
      source - The source of the Movement
      types - The type of Movement
      Returns:
      A list of, never null
    • getPriorityList

      List<String> getPriorityList()
      Get all priorities as a list of strings.
      Returns:
      The list of priorities
    • move

      @NotNull @NotNull MovementVO move(@NotBlank @NotBlank String pKey, @Valid @NotNull @Valid @NotNull MovementVO vo)
      Move a Movement to a new location.
      Parameters:
      pKey - The persistent key of the Movement
      vo - The Movement data must contain the new source
      Returns:
      The moved instance
    • complete

      @NotNull @NotNull MovementVO complete(@NotBlank @NotBlank String pKey, @Valid @NotNull @Valid @NotNull MovementVO vo)
      Complete a Movement.
      Parameters:
      pKey - The identifying persistent key of the Movement to complete
      vo - Required data to set at completion
      Returns:
      The completed instance
    • cancel

      @NotNull @NotNull MovementVO cancel(@NotBlank @NotBlank String pKey)
      Cancel an existing Movement.
      Parameters:
      pKey - The identifying persistent key of the Movement to complete
      Returns:
      The cancelled instance
    • findAll

      @NotNull @NotNull List<MovementVO> findAll()
      Find and return all existing Movements.
      Returns:
      All instances, never null
    • findForTuAndTypesAndStates

      @NotNull @NotNull List<MovementVO> findForTuAndTypesAndStates(@NotBlank @NotBlank String barcode, @NotEmpty @NotEmpty List<MovementType> types, @NotEmpty @NotEmpty List<String> states)
      Find all Movements for a TransportUnit with the given barcode and states.
      Parameters:
      barcode - The business key of the TransportUnit to move
      types - A list of types to consider
      states - A list of states to consider
      Returns:
      A list of Movements, never null