Package org.openwms.common.location
Interface LocationGroupService
- All Known Implementing Classes:
LocationGroupServiceImpl
public interface LocationGroupService
A LocationGroupService offers some useful methods regarding the general handling of
LocationGroup
s. This interface is
declared generic typed that implementation classes can use any extension of LocationGroup
s.
- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeGroupState
(@NotBlank String pKey, @NotNull LocationGroupState stateIn, @NotNull LocationGroupState stateOut) Change the infeed and outfeed state of aLocationGroup
.void
changeGroupStates
(@NotBlank String name, Optional<LocationGroupState> stateIn, Optional<LocationGroupState> stateOut) Change the infeed and outfeed state of aLocationGroup
.void
changeOperationMode
(@NotBlank String name, @NotBlank String mode) Change the operation mode of aLocationGroup
.@NotNull LocationGroup
create
(@NotNull @Valid LocationGroupVO vo) Creates a newLocationGroup
based on the providedLocationGroupVO
representation.void
Delete aLocationGroup
with all attached sub-groups andLocation
s.@NotNull List
<LocationGroup> findAll()
Find and return allLocationGroup
s.findByName
(@NotBlank String name) Find and return aLocationGroup
identified by its uniquename
.@NotNull LocationGroup
findByNameOrThrow
(@NotBlank String name) Find and return aLocationGroup
identified by its uniquename
.@NotNull List
<LocationGroup> findByNames
(@NotEmpty List<String> locationGroupNames) Find and return allLocationGroup
s with the givenlocationGroupNames
.@NotNull LocationGroup
update
(@NotBlank String pKey, @NotNull LocationGroupVO locationGroupVO) Updates a LocationGroup based on the provided persisted key andLocationGroupVO
representation.
-
Method Details
-
create
@NotNull @NotNull LocationGroup create(@NotNull @Validated(Create.class) @Valid @NotNull @Valid LocationGroupVO vo) Creates a newLocationGroup
based on the providedLocationGroupVO
representation.- Parameters:
vo
- TheLocationGroupVO
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 aLocationGroup
.- Parameters:
pKey
- The persisted key of the LocationGroup to changestateIn
- The new infeed statestateOut
- The new outfeed state
-
changeGroupStates
void changeGroupStates(@NotBlank @NotBlank String name, Optional<LocationGroupState> stateIn, Optional<LocationGroupState> stateOut) Change the infeed and outfeed state of aLocationGroup
.- Parameters:
name
- The name of the LocationGroup to changestateIn
- The new infeed statestateOut
- The new outfeed state- Throws:
org.ameba.exception.NotFoundException
- In case it doesn't exist
-
changeOperationMode
Change the operation mode of aLocationGroup
.- Parameters:
name
- The name of the LocationGroup to changemode
- The new operation mode to set- Throws:
org.ameba.exception.NotFoundException
- In case it doesn't exist- See Also:
-
findByName
Find and return aLocationGroup
identified by its uniquename
.- Parameters:
name
- The name to search for- Returns:
- The optional LocationGroup instance
-
findByNameOrThrow
Find and return aLocationGroup
identified by its uniquename
.- Parameters:
name
- The name to search for- Returns:
- The LocationGroup, never null
- Throws:
org.ameba.exception.NotFoundException
- In case it doesn't exist
-
findAll
Find and return allLocationGroup
s.- Returns:
- All existing instances or an empty List, never null
-
findByNames
@NotNull @NotNull List<LocationGroup> findByNames(@NotEmpty @NotEmpty List<String> locationGroupNames) Find and return allLocationGroup
s with the givenlocationGroupNames
.- Parameters:
locationGroupNames
- The names of the LocationGroups to search for- Returns:
- Always a list instance, never null
-
delete
Delete aLocationGroup
with all attached sub-groups andLocation
s.- 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 andLocationGroupVO
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
-