Package org.openwms.wms.inventory.impl
Class PackagingUnitCreatorImpl
java.lang.Object
org.openwms.wms.inventory.impl.PackagingUnitCreatorImpl
- All Implemented Interfaces:
PackagingUnitCreator
A PackagingUnitCreatorImpl is a Spring managed transactional bean that is responsible for creating
PackagingUnit
s.- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisher
private final LoadUnitService
private final LocationService
private static final org.slf4j.Logger
private final ProductService
private final PackagingUnitRepository
private final TimeProvider
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorsConstructorDescriptionPackagingUnitCreatorImpl
(org.springframework.context.ApplicationEventPublisher eventPublisher, org.ameba.i18n.Translator translator, PackagingUnitRepository repository, LoadUnitService loadUnitService, LocationService locationService, ProductService productService) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(@NotNull @Valid PackagingUnit packagingUnit) Create a newPackagingUnit
.createInContainer
(@NotBlank String transportUnitBK, @NotBlank String luPos, @NotNull PackagingUnit packagingUnit, String loadUnitType) Create a newPackagingUnit
with the given packagingUnit that is located in the namedLoadUnit
on the namedTransportUnit
.private PackagingUnit
createInternal
(LoadUnit loadUnit, PackagingUnit packagingUnit) void
createMultipleInContainer
(@NotBlank String transportUnitBK, @NotBlank String luPos, @NotEmpty List<PackagingUnit> packagingUnits, String loadUnitType) private LoadUnit
getOrCreateLoadUnit
(String transportUnitBK, String luPos, String loadUnitType)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
timeProvider
-
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher -
translator
private final org.ameba.i18n.Translator translator -
repository
-
loadUnitService
-
locationService
-
productService
-
-
Constructor Details
-
PackagingUnitCreatorImpl
PackagingUnitCreatorImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, org.ameba.i18n.Translator translator, PackagingUnitRepository repository, LoadUnitService loadUnitService, LocationService locationService, ProductService productService)
-
-
Method Details
-
createInContainer
@Measured public PackagingUnit createInContainer(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String luPos, @NotNull @NotNull PackagingUnit packagingUnit, String loadUnitType) Create a newPackagingUnit
with the given packagingUnit that is located in the namedLoadUnit
on the namedTransportUnit
.- Specified by:
createInContainer
in interfacePackagingUnitCreator
- Parameters:
transportUnitBK
- The business key of the TransportUnit the PackagingUnit is carried onluPos
- The position of the LoadUnit within the TransportUnitpackagingUnit
- The PackagingUnit to createloadUnitType
- In case the LoadUnit needs to be created this is the type that is used- Returns:
- The created instance
-
createInternal
-
getOrCreateLoadUnit
-
createMultipleInContainer
@Measured public void createMultipleInContainer(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String luPos, @NotEmpty @NotEmpty List<PackagingUnit> packagingUnits, String loadUnitType) - Specified by:
createMultipleInContainer
in interfacePackagingUnitCreator
- Parameters:
transportUnitBK
- The business key of the TransportUnit the PackagingUnits are carried onluPos
- The position of the LoadUnit within the TransportUnitpackagingUnits
- The PackagingUnits to createloadUnitType
- In case the LoadUnit needs to be created this is the type that is used
-
create
@Measured @Validated(CreatePackagingUnit.class) public PackagingUnit create(@NotNull @Valid @NotNull @Valid PackagingUnit packagingUnit) Create a newPackagingUnit
.- Specified by:
create
in interfacePackagingUnitCreator
- Parameters:
packagingUnit
- The PackagingUnit to create- Returns:
- The created instance
-