Package org.openwms.wms.shipping.impl
Class ShippingServiceImpl
java.lang.Object
org.openwms.wms.shipping.impl.ShippingServiceImpl
- All Implemented Interfaces:
ShippingService
A ShippingServiceImpl is a transactional Spring managed Service bean that is responsible for the management of ShippingOrders.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisher
private static final org.slf4j.Logger
private final org.springframework.plugin.core.PluginRegistry
<ShippingOrderUpdater, ShippingOrderUpdater.Type> private final org.springframework.plugin.core.PluginRegistry
<ShippingOrderPositionUpdater, ShippingOrderPositionUpdater.Type> private final ProductMapper
private final ProductRepository
private final ShippingOrderRepository
private final ShippingOrderPositionRepository
private final SyncProductApi
private final TargetResolver
private final org.ameba.i18n.Translator
private final javax.validation.Validator
-
Constructor Summary
ConstructorDescriptionShippingServiceImpl
(org.ameba.i18n.Translator translator, ProductMapper productMapper, ProductRepository productRepository, ShippingOrderRepository repository, ShippingOrderPositionRepository shippingOrderPositionRepository, SyncProductApi syncProductApi, TargetResolver targetResolver, org.springframework.plugin.core.PluginRegistry<ShippingOrderUpdater, ShippingOrderUpdater.Type> orderPlugins, org.springframework.plugin.core.PluginRegistry<ShippingOrderPositionUpdater, ShippingOrderPositionUpdater.Type> plugins, org.springframework.context.ApplicationEventPublisher eventPublisher, javax.validation.Validator validator) -
Method Summary
Modifier and TypeMethodDescriptionchangeState
(@NotNull ShippingOrderPosition shippingOrderPosition, @NotNull OrderState orderState) Change the state of an existingShippingOrderPosition
.changeState
(@NotNull ShippingOrder shippingOrder, @NotNull OrderState orderState) Change the state of an existingShippingOrder
.createOrder
(@NotNull ShippingOrder order) Create a new ShippingOrder.findByOrderId
(@NotEmpty String orderId) Find and return a ShippingOrder.findByPKey
(@NotEmpty String pKey) Find and return a ShippingOrder.findByPositionPKey
(String pKey) Find and return aShippingOrder
.private ShippingOrderPosition
findInternal
(String pKey) private Product
resolveProduct
(String sku) updateOrderPartially
(@NotEmpty String pKey, @NotNull ShippingOrder sop) Partially update a singleShippingOrder
.updatePositionPartially
(@NotEmpty String pKey, @NotNull ShippingOrderPosition sop) Partially update a singleShippingOrderPosition
.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
translator
private final org.ameba.i18n.Translator translator -
productMapper
-
productRepository
-
repository
-
shippingOrderPositionRepository
-
syncProductApi
-
targetResolver
-
orderPlugins
private final org.springframework.plugin.core.PluginRegistry<ShippingOrderUpdater,ShippingOrderUpdater.Type> orderPlugins -
plugins
private final org.springframework.plugin.core.PluginRegistry<ShippingOrderPositionUpdater,ShippingOrderPositionUpdater.Type> plugins -
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher -
validator
private final javax.validation.Validator validator
-
-
Constructor Details
-
ShippingServiceImpl
ShippingServiceImpl(org.ameba.i18n.Translator translator, ProductMapper productMapper, ProductRepository productRepository, ShippingOrderRepository repository, ShippingOrderPositionRepository shippingOrderPositionRepository, SyncProductApi syncProductApi, TargetResolver targetResolver, org.springframework.plugin.core.PluginRegistry<ShippingOrderUpdater, ShippingOrderUpdater.Type> orderPlugins, org.springframework.plugin.core.PluginRegistry<ShippingOrderPositionUpdater, ShippingOrderPositionUpdater.Type> plugins, org.springframework.context.ApplicationEventPublisher eventPublisher, javax.validation.Validator validator)
-
-
Method Details
-
createOrder
@Transactional(propagation=REQUIRES_NEW) @Measured public ShippingOrder createOrder(@NotNull @NotNull ShippingOrder order) Create a new ShippingOrder.- Specified by:
createOrder
in interfaceShippingService
- Parameters:
order
- The ShippingOrder instance to store
-
resolveProduct
-
changeState
@Measured public ShippingOrder changeState(@NotNull @NotNull ShippingOrder shippingOrder, @NotNull @NotNull OrderState orderState) Change the state of an existingShippingOrder
.- Specified by:
changeState
in interfaceShippingService
- Parameters:
shippingOrder
- The ShippingOrder instance to change the state fororderState
- The new order state to set- Returns:
- The updated instance
-
changeState
@Measured public ShippingOrderPosition changeState(@NotNull @NotNull ShippingOrderPosition shippingOrderPosition, @NotNull @NotNull OrderState orderState) Change the state of an existingShippingOrderPosition
.- Specified by:
changeState
in interfaceShippingService
- Parameters:
shippingOrderPosition
- The ShippingOrderPosition instance to change the state fororderState
- The new order state to set- Returns:
- The updated instance
-
findByPKey
Find and return a ShippingOrder.- Specified by:
findByPKey
in interfaceShippingService
- Parameters:
pKey
- The persistent key of the ShippingOrder- Returns:
- The instance
-
findByOrderId
Find and return a ShippingOrder.- Specified by:
findByOrderId
in interfaceShippingService
- Parameters:
orderId
- The business key of the ShippingOrder- Returns:
- The instance
-
findByPositionPKey
Find and return aShippingOrder
.- Specified by:
findByPositionPKey
in interfaceShippingService
- Parameters:
pKey
- The persistent key of the order- Returns:
- The instance, never null
-
updateOrderPartially
@Measured public ShippingOrder updateOrderPartially(@NotEmpty @NotEmpty String pKey, @NotNull @NotNull ShippingOrder sop) Partially update a singleShippingOrder
.- Specified by:
updateOrderPartially
in interfaceShippingService
- Parameters:
pKey
- The persistent key of the existing ShippingOrdersop
- The partial content of the ShippingOrder- Returns:
- The updated instance
-
updatePositionPartially
@Measured public ShippingOrderPosition updatePositionPartially(@NotEmpty @NotEmpty String pKey, @NotNull @NotNull ShippingOrderPosition sop) Partially update a singleShippingOrderPosition
.- Specified by:
updatePositionPartially
in interfaceShippingService
- Parameters:
pKey
- The persistent key of the existing ShippingOrderPositionsop
- The partial content of the ShippingOrderPosition- Returns:
- The updated instance
-
findInternal
-