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
LocationGroups. This interface is
declared generic typed that implementation classes can use any extension of LocationGroups.
- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangeGroupState(@NotBlank String pKey, @NotNull LocationGroupState stateIn, @NotNull LocationGroupState stateOut) Change the infeed and outfeed state of aLocationGroup.voidchangeGroupStates(@NotBlank String name, Optional<LocationGroupState> stateIn, Optional<LocationGroupState> stateOut) Change the infeed and outfeed state of aLocationGroup.voidchangeOperationMode(@NotBlank String name, @NotBlank String mode) Change the operation mode of aLocationGroup.@NotNull LocationGroupcreate(@NotNull @Valid LocationGroupVO vo) Creates a newLocationGroupbased on the providedLocationGroupVOrepresentation.voidDelete aLocationGroupwith all attached sub-groups andLocations.@NotNull List<LocationGroup> findAll()Find and return allLocationGroups.findByName(@NotBlank String name) Find and return aLocationGroupidentified by its uniquename.@NotNull LocationGroupfindByNameOrThrow(@NotBlank String name) Find and return aLocationGroupidentified by its uniquename.@NotNull List<LocationGroup> findByNames(@NotEmpty List<String> locationGroupNames) Find and return allLocationGroups with the givenlocationGroupNames.@NotNull LocationGroupupdate(@NotBlank String pKey, @NotNull LocationGroupVO locationGroupVO) Updates a LocationGroup based on the provided persisted key andLocationGroupVOrepresentation.
-
Method Details
-
create
@NotNull @NotNull LocationGroup create(@NotNull @Validated(Create.class) @Valid @NotNull @Valid LocationGroupVO vo) Creates a newLocationGroupbased on the providedLocationGroupVOrepresentation.- Parameters:
vo- TheLocationGroupVOcontaining 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 aLocationGroupidentified by its uniquename.- Parameters:
name- The name to search for- Returns:
- The optional LocationGroup instance
-
findByNameOrThrow
Find and return aLocationGroupidentified 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 allLocationGroups.- Returns:
- All existing instances or an empty List, never null
-
findByNames
@NotNull @NotNull List<LocationGroup> findByNames(@NotEmpty @NotEmpty List<String> locationGroupNames) Find and return allLocationGroups with the givenlocationGroupNames.- Parameters:
locationGroupNames- The names of the LocationGroups to search for- Returns:
- Always a list instance, never null
-
delete
Delete aLocationGroupwith all attached sub-groups andLocations.- 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 andLocationGroupVOrepresentation.- 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
-