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
PackagingUnits.- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisherprivate final LoadUnitServiceprivate final LocationServiceprivate static final org.slf4j.Loggerprivate final ProductServiceprivate final PackagingUnitRepositoryprivate final TimeProviderprivate 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(@NotEmpty @Valid List<PackagingUnit> packagingUnits) Create newPackagingUnits.create(@NotNull @Valid PackagingUnit packagingUnit) Create a newPackagingUnit.createInContainer(@NotBlank String transportUnitBK, @NotBlank String luPos, @NotNull PackagingUnit packagingUnit, String loadUnitType) Create a newPackagingUnitwith the given packagingUnit that is located in the namedLoadUniton the namedTransportUnit.private PackagingUnitcreateInternal(LoadUnit loadUnit, PackagingUnit packagingUnit) private PackagingUnitcreateInternal(PackagingUnit packagingUnit) voidcreateMultipleInContainer(@NotBlank String transportUnitBK, @NotBlank String luPos, @NotEmpty List<PackagingUnit> packagingUnits, String loadUnitType) private LoadUnitgetOrCreateLoadUnit(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 newPackagingUnitwith the given packagingUnit that is located in the namedLoadUniton the namedTransportUnit.- Specified by:
createInContainerin 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:
createMultipleInContainerin 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:
createin interfacePackagingUnitCreator- Parameters:
packagingUnit- The PackagingUnit to create- Returns:
- The created instance
-
createInternal
-
create
@Measured @Validated(CreatePackagingUnit.class) public List<PackagingUnit> create(@NotEmpty @Valid @NotEmpty @Valid List<PackagingUnit> packagingUnits) Create newPackagingUnits.- Specified by:
createin interfacePackagingUnitCreator- Parameters:
packagingUnits- The PackagingUnits to create- Returns:
- The created instances
-