Package org.openwms.wms.movements.impl
Class MovementServiceImpl
java.lang.Object
org.openwms.wms.movements.impl.MovementServiceImpl
- All Implemented Interfaces:
 MovementService
@Validated
@TxService
@RefreshScope
class MovementServiceImpl
extends Object
implements MovementService
A MovementServiceImpl is a Spring managed transaction service that deals with 
Movements.- Author:
 - Heiko Scherrer
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisherprivate final org.springframework.plugin.core.PluginRegistry<MovementHandler, MovementType> private final org.openwms.common.location.api.LocationApiprivate final org.openwms.common.location.api.LocationGroupApiprivate static final org.slf4j.Loggerprivate final MovementMapperprivate final MovementStateResolverprivate final MovementTypeResolverprivate final MovementRepositoryprivate final org.ameba.i18n.Translatorprivate final org.openwms.common.transport.api.TransportUnitApiprivate final jakarta.validation.Validatorprivate final Validators - 
Constructor Summary
ConstructorsConstructorDescriptionMovementServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, MovementMapper mapper, jakarta.validation.Validator validator, org.ameba.i18n.Translator translator, MovementStateResolver movementStateResolver, MovementRepository repository, MovementTypeResolver movementTypeResolver, org.springframework.plugin.core.PluginRegistry<MovementHandler, MovementType> handlers, Validators validators, org.openwms.common.transport.api.TransportUnitApi transportUnitApi, org.openwms.common.location.api.LocationApi locationApi, org.openwms.common.location.api.LocationGroupApi locationGroupApi)  - 
Method Summary
Modifier and TypeMethodDescription@NotNull MovementVOCancel an existingMovement.@NotNull MovementVOcomplete(@NotBlank String pKey, @Valid @NotNull MovementVO vo) Complete aMovement.private MovementVO@NotNull MovementVOcreate(@NotBlank(groups=Create.class) String bk, @NotNull(groups=Create.class) @Valid MovementVO vo) Create a newMovementfor aTransportUnit.@NotNull List<MovementVO> findAll()Find and return all existingMovements.findFor(@NotNull MovementState state, @NotBlank String source, @NotEmpty MovementType... types) Find and returnMovementsin the givenstateand of one of thetypes.findForTuAndTypesAndStates(@NotBlank String barcode, @NotEmpty List<MovementType> types, @NotEmpty List<String> states) Find allMovements for aTransportUnitwith the givenbarcodeandstates.private MovementfindInternal(String pKey) Get all priorities as a list of strings.@NotNull MovementVOmove(@NotBlank String pKey, @Valid @NotNull MovementVO vo) Move aMovementto a new location.private MovementHandlerresolveHandler(MovementType type) private org.openwms.common.location.api.LocationVOresolveLocation(String locationIdentifier) private voidprivate void 
- 
Field Details
- 
LOGGER
private static final org.slf4j.Logger LOGGER - 
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher - 
mapper
 - 
validator
private final jakarta.validation.Validator validator - 
translator
private final org.ameba.i18n.Translator translator - 
movementStateResolver
 - 
repository
 - 
movementTypeResolver
 - 
handlers
 - 
validators
 - 
transportUnitApi
private final org.openwms.common.transport.api.TransportUnitApi transportUnitApi - 
locationApi
private final org.openwms.common.location.api.LocationApi locationApi - 
locationGroupApi
private final org.openwms.common.location.api.LocationGroupApi locationGroupApi 
 - 
 - 
Constructor Details
- 
MovementServiceImpl
MovementServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, MovementMapper mapper, jakarta.validation.Validator validator, org.ameba.i18n.Translator translator, MovementStateResolver movementStateResolver, MovementRepository repository, @Autowired(required=false) MovementTypeResolver movementTypeResolver, org.springframework.plugin.core.PluginRegistry<MovementHandler, MovementType> handlers, Validators validators, org.openwms.common.transport.api.TransportUnitApi transportUnitApi, org.openwms.common.location.api.LocationApi locationApi, org.openwms.common.location.api.LocationGroupApi locationGroupApi)  
 - 
 - 
Method Details
- 
create
@Measured @Validated(Create.class) @NotNull public @NotNull MovementVO create(@NotBlank(groups=Create.class) @NotBlank(groups=Create.class) String bk, @NotNull(groups=Create.class) @Valid @NotNull(groups=Create.class) @Valid MovementVO vo) Create a newMovementfor aTransportUnit.- Specified by:
 createin interfaceMovementService- Parameters:
 bk- The identifying business key of the TransportUnit to movevo- Detailed Movement information- Returns:
 - The created Movement instance
 
 - 
resolveHandler
 - 
resolveTransportUnit
 - 
resolveLocation
 - 
validateAndResolveType
 - 
findFor
@Measured public List<MovementVO> findFor(@NotNull @NotNull MovementState state, @NotBlank @NotBlank String source, @NotEmpty @NotEmpty MovementType... types) Find and returnMovementsin the givenstateand of one of thetypes.- Specified by:
 findForin interfaceMovementService- Parameters:
 state- The state the Movement is insource- The source of the Movementtypes- The type of Movement- Returns:
 - A list of, never null
 
 - 
getPriorityList
Get all priorities as a list of strings.- Specified by:
 getPriorityListin interfaceMovementService- Returns:
 - The list of priorities
 
 - 
findInternal
 - 
move
@Validated(Move.class) @Measured @NotNull public @NotNull MovementVO move(@NotBlank @NotBlank String pKey, @Valid @NotNull @Valid @NotNull MovementVO vo) Move aMovementto a new location.- Specified by:
 movein interfaceMovementService- Parameters:
 pKey- The persistent key of the Movementvo- The Movement data must contain the new source- Returns:
 - The moved instance
 
 - 
complete
@Validated(Complete.class) @Measured @NotNull public @NotNull MovementVO complete(@NotBlank @NotBlank String pKey, @Valid @NotNull @Valid @NotNull MovementVO vo) Complete aMovement.- Specified by:
 completein interfaceMovementService- Parameters:
 pKey- The identifying persistent key of the Movement to completevo- Required data to set at completion- Returns:
 - The completed instance
 
 - 
cancel
Cancel an existingMovement.- Specified by:
 cancelin interfaceMovementService- Parameters:
 pKey- The identifying persistent key of the Movement to complete- Returns:
 - The cancelled instance
 
 - 
findAll
Find and return all existingMovements.- Specified by:
 findAllin interfaceMovementService- Returns:
 - All instances, never null
 
 - 
findForTuAndTypesAndStates
@Measured public List<MovementVO> findForTuAndTypesAndStates(@NotBlank @NotBlank String barcode, @NotEmpty @NotEmpty List<MovementType> types, @NotEmpty @NotEmpty List<String> states) Find allMovements for aTransportUnitwith the givenbarcodeandstates.- Specified by:
 findForTuAndTypesAndStatesin interfaceMovementService- Parameters:
 barcode- The business key of the TransportUnit to movetypes- A list of types to considerstates- A list of states to consider- Returns:
 - A list of Movements, never null
 
 - 
convert
 
 -