org.openwms.tms.service.spring
Class TransportServiceImpl

java.lang.Object
  extended by org.openwms.core.service.spring.EntityServiceImpl<TransportOrder,Long>
      extended by org.openwms.tms.service.spring.TransportServiceImpl
All Implemented Interfaces:
EntityService<TransportOrder>, TransportOrderService<TransportOrder>, org.springframework.context.ApplicationContextAware

@Service(value="transportService")
@Transactional
public class TransportServiceImpl
extends EntityServiceImpl<TransportOrder,Long>
implements TransportOrderService<TransportOrder>

A TransportService.

Since:
0.1
Version:
$Revision: 1583 $
Author:
Heiko Scherrer
See Also:
EntityServiceImpl, TransportOrderService

Field Summary
 
Fields inherited from class org.openwms.core.service.spring.EntityServiceImpl
ctx
 
Constructor Summary
TransportServiceImpl()
           
 
Method Summary
 List<Integer> cancelTransportOrders(List<Integer> ids, TransportOrderState state)
          Try to turn a list of TransportOrders into state.
 TransportOrder createTransportOrder(Barcode barcode, LocationGroup targetLocationGroup, Location targetLocation, PriorityLevel priority)
          Create a new TransportOrder.
 TransportOrder createTransportOrder(Barcode barcode, LocationGroup targetLocationGroup, PriorityLevel priority)
          Create a new TransportOrder.
 TransportOrder createTransportOrder(Barcode barcode, Location targetLocation, PriorityLevel priority)
          Create a new TransportOrder.
protected  TransportOrderDao getDao()
          Get an instance of TransportOrderDao.
 int getTransportsToLocationGroup(LocationGroup locationGroup)
          Returns the actual number of active transports that have the locationGroup as target LocationGroup.
 List<Integer> redirectTransportOrders(List<Integer> ids, LocationGroup targetLocationGroup, Location targetLocation)
          Try to redirect a list of TransportOrders to a new target LocationGroup.
 
Methods inherited from class org.openwms.core.service.spring.EntityServiceImpl
add, findAll, remove, save, setApplicationContext, setDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openwms.core.service.EntityService
add, findAll, remove, save
 

Constructor Detail

TransportServiceImpl

public TransportServiceImpl()
Method Detail

getDao

protected TransportOrderDao getDao()
Get an instance of TransportOrderDao.

Returns:
the dao.

getTransportsToLocationGroup

public int getTransportsToLocationGroup(LocationGroup locationGroup)
Returns the actual number of active transports that have the locationGroup as target LocationGroup. Just delegates to the dao.

Specified by:
getTransportsToLocationGroup in interface TransportOrderService<TransportOrder>
Parameters:
locationGroup - LocationGroup to count all active transports for
Returns:
Number of all active transports that are on the way to this LocationGroup
See Also:
TransportOrderService.getTransportsToLocationGroup(org.openwms.common.domain.LocationGroup)

createTransportOrder

public TransportOrder createTransportOrder(Barcode barcode,
                                           LocationGroup targetLocationGroup,
                                           PriorityLevel priority)
Create a new TransportOrder.

Specified by:
createTransportOrder in interface TransportOrderService<TransportOrder>
Parameters:
barcode - The Barcode of the TransportUnit
targetLocationGroup - The target LocationGroup
priority - A PriorityLevel of the new TransportOrder
Returns:
The new created TransportOrder
See Also:
TransportOrderService.createTransportOrder(org.openwms.common.domain.values.Barcode, org.openwms.common.domain.LocationGroup, org.openwms.tms.domain.values.PriorityLevel)

createTransportOrder

public TransportOrder createTransportOrder(Barcode barcode,
                                           Location targetLocation,
                                           PriorityLevel priority)
Create a new TransportOrder.

Specified by:
createTransportOrder in interface TransportOrderService<TransportOrder>
Parameters:
barcode - The Barcode of the TransportUnit
targetLocation - The target Location
priority - A PriorityLevel of the new TransportOrder
Returns:
The new created TransportOrder
See Also:
TransportOrderService.createTransportOrder(org.openwms.common.domain.values.Barcode, org.openwms.common.domain.Location, org.openwms.tms.domain.values.PriorityLevel)

createTransportOrder

public TransportOrder createTransportOrder(Barcode barcode,
                                           LocationGroup targetLocationGroup,
                                           Location targetLocation,
                                           PriorityLevel priority)
Create a new TransportOrder. Checks that all necessary data to create a TransportOrder is given, does not do any logical checks, whether a target is blocked or a TransportOrder for the TransportUnit exist.

Specified by:
createTransportOrder in interface TransportOrderService<TransportOrder>
Parameters:
barcode - The Barcode of the TransportUnit
targetLocationGroup - The target LocationGroup
targetLocation - The target Location
priority - A PriorityLevel of the new TransportOrder
Returns:
The new created TransportOrder
Throws:
TransportOrderServiceException - when the barcode is null or no transportUnit with barcode can be found or no target can be found.
See Also:
TransportOrderService.createTransportOrder(org.openwms.common.domain.values.Barcode, org.openwms.common.domain.LocationGroup, org.openwms.common.domain.Location, org.openwms.tms.domain.values.PriorityLevel)

cancelTransportOrders

public List<Integer> cancelTransportOrders(List<Integer> ids,
                                           TransportOrderState state)
Try to turn a list of TransportOrders into state.

Specified by:
cancelTransportOrders in interface TransportOrderService<TransportOrder>
Parameters:
ids - The IDs of TransportOrders
state - The state to change all orders to
Returns:
A list of TransportOrder IDs that have not been canceled successfully
See Also:
TransportOrderService.cancelTransportOrders(List, TransportOrderState)

redirectTransportOrders

public List<Integer> redirectTransportOrders(List<Integer> ids,
                                             LocationGroup targetLocationGroup,
                                             Location targetLocation)
Try to redirect a list of TransportOrders to a new target LocationGroup.

Specified by:
redirectTransportOrders in interface TransportOrderService<TransportOrder>
Parameters:
ids - The IDs of TransportOrders to be redirected
targetLocationGroup - The new target LocationGroup for the TransportOrders or null
targetLocation - The new target Location for the TransportOrder s, or null
Returns:
A list of TransportOrder IDs that couldn't be redirected successfully
Throws:
TransportOrderServiceException - when both targets are null
See Also:
TransportOrderService.redirectTransportOrders(java.util.List, org.openwms.common.domain.LocationGroup, org.openwms.common.domain.Location)


Copyright © 2005-2011 openwms.org. All Rights Reserved.