Interface LocationGroupService

All Known Implementing Classes:
LocationGroupServiceImpl

public interface LocationGroupService
A LocationGroupService offers some useful methods regarding the general handling of LocationGroups.

This interface is declared generic typed that implementation classes can use any extension of LocationGroups.

Author:
Heiko Scherrer
  • Method Details

    • create

      @NotNull @NotNull LocationGroup create(@NotNull @Validated(Create.class) @Valid @NotNull @Valid LocationGroupVO vo)
      Creates a new LocationGroup based on the provided LocationGroupVO representation.
      Parameters:
      vo - The LocationGroupVO containing the information for the new LocationGroup
      Returns:
      The created LocationGroup
    • changeGroupState

      void changeGroupState(@NotBlank @NotBlank String pKey, @NotNull @NotNull LocationGroupState stateIn, @NotNull @NotNull LocationGroupState stateOut)
      Change the infeed and outfeed state of a LocationGroup.
      Parameters:
      pKey - The persisted key of the LocationGroup to change
      stateIn - The new infeed state
      stateOut - The new outfeed state
    • changeGroupStates

      void changeGroupStates(@NotBlank @NotBlank String name, Optional<LocationGroupState> stateIn, Optional<LocationGroupState> stateOut)
      Change the infeed and outfeed state of a LocationGroup.
      Parameters:
      name - The name of the LocationGroup to change
      stateIn - The new infeed state
      stateOut - The new outfeed state
      Throws:
      org.ameba.exception.NotFoundException - In case it doesn't exist
    • changeOperationMode

      void changeOperationMode(@NotBlank @NotBlank String name, @NotBlank @NotBlank String mode)
      Change the operation mode of a LocationGroup.
      Parameters:
      name - The name of the LocationGroup to change
      mode - The new operation mode to set
      Throws:
      org.ameba.exception.NotFoundException - In case it doesn't exist
      See Also:
    • findByName

      Optional<LocationGroup> findByName(@NotBlank @NotBlank String name)
      Find and return a LocationGroup identified by its unique name.
      Parameters:
      name - The name to search for
      Returns:
      The optional LocationGroup instance
    • findByNameOrThrow

      @NotNull @NotNull LocationGroup findByNameOrThrow(@NotBlank @NotBlank String name)
      Find and return a LocationGroup identified by its unique name.
      Parameters:
      name - The name to search for
      Returns:
      The LocationGroup, never null
      Throws:
      org.ameba.exception.NotFoundException - In case it doesn't exist
    • findAll

      @NotNull @NotNull List<LocationGroup> findAll()
      Find and return all LocationGroups.
      Returns:
      All existing instances or an empty List, never null
    • findByNames

      @NotNull @NotNull List<LocationGroup> findByNames(@NotEmpty @NotEmpty List<String> locationGroupNames)
      Find and return all LocationGroups with the given locationGroupNames.
      Parameters:
      locationGroupNames - The names of the LocationGroups to search for
      Returns:
      Always a list instance, never null
    • delete

      void delete(@NotBlank @NotBlank String pKey)
      Delete a LocationGroup with all attached sub-groups and Locations.
      Parameters:
      pKey - The persisted key of the LocationGroup to change
    • update

      @NotNull @NotNull LocationGroup update(@NotBlank @NotBlank String pKey, @NotNull @NotNull LocationGroupVO locationGroupVO)
      Updates a LocationGroup based on the provided persisted key and LocationGroupVO representation.
      Parameters:
      pKey - The persisted key of the LocationGroup to update (must not be blank)
      locationGroupVO - The updated information for the LocationGroup (must not be null)
      Returns:
      The updated LocationGroup