|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openwms.core.service.spring.EntityServiceImpl<TransportUnit,Long>
org.openwms.common.service.spring.TransportUnitServiceImpl
@Service @Transactional public class TransportUnitServiceImpl
A TransportUnitServiceImpl.
EntityServiceImpl
Field Summary |
---|
Fields inherited from class org.openwms.core.service.spring.EntityServiceImpl |
---|
ctx |
Constructor Summary | |
---|---|
TransportUnitServiceImpl()
|
Method Summary | |
---|---|
TransportUnit |
createTransportUnit(Barcode barcode,
TransportUnitType transportUnitType,
LocationPK actualLocation)
Create a new TransportUnit with the type
TransportUnitType placed on an initial Location . |
TransportUnitType |
createTransportUnitType(TransportUnitType transportUnitType)
Create a new TransportUnitType . |
void |
deleteTransportUnits(List<TransportUnit> transportUnits)
Delete already persisted TransportUnit s from the persistence
storage. |
void |
deleteTransportUnitTypes(List<TransportUnitType> transportUnitTypes)
Delete already persisted TransportUnitType instances. |
List<TransportUnit> |
getAllTransportUnits()
Returns an unsorted List of all TransportUnit s. |
List<TransportUnitType> |
getAllTransportUnitTypes()
Returns an unsorted List of all TransportUnitType s. |
List<Rule> |
loadRules(String transportUnitType)
Return a List of all Rule s that belong
to this TransportUnitType type. |
void |
moveTransportUnit(Barcode barcode,
LocationPK targetLocationPK)
Move a TransportUnit identified by its Barcode to the
given target Location identified by the LocationPK . |
TransportUnitType |
saveTransportUnitType(TransportUnitType transportUnitType)
Save an already persisted instance of TransportUnitType . |
void |
setOnRemovalListener(OnRemovalListener<TransportUnit> onRemovalListener)
|
TransportUnitType |
updateRules(String type,
List<LocationType> newAssigned,
List<LocationType> newNotAssigned)
Update the List of TypePlacingRule s for
the given TransportUnitType type. |
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 |
---|
public TransportUnitServiceImpl()
Method Detail |
---|
public void setOnRemovalListener(OnRemovalListener<TransportUnit> onRemovalListener)
public TransportUnit createTransportUnit(Barcode barcode, TransportUnitType transportUnitType, LocationPK actualLocation)
TransportUnit
with the type
TransportUnitType
placed on an initial Location
. The
new TransportUnit
has the given Barcode
as identifier.
createTransportUnit
in interface TransportUnitService<TransportUnit>
barcode
- Barcode
of the new TransportUnit
transportUnitType
- The type of the new TransportUnit
actualLocation
- The Location
where the TransportUnit
is
placed on
TransportUnit
instance@Transactional(readOnly=true) public List<TransportUnit> getAllTransportUnits()
TransportUnit
s.
getAllTransportUnits
in interface TransportUnitService<TransportUnit>
TransportUnit
s@Transactional(readOnly=true) public List<TransportUnitType> getAllTransportUnitTypes()
TransportUnitType
s.
getAllTransportUnitTypes
in interface TransportUnitService<TransportUnit>
TransportUnitType
spublic List<Rule> loadRules(String transportUnitType)
Rule
s that belong
to this TransportUnitType
type.
loadRules
in interface TransportUnitService<TransportUnit>
transportUnitType
- The TransportUnitType
to search for.
null
if no Rule
was
found.public TransportUnitType createTransportUnitType(TransportUnitType transportUnitType)
TransportUnitType
.
createTransportUnitType
in interface TransportUnitService<TransportUnit>
transportUnitType
- The type to be created
TransportUnitType
instance.public void deleteTransportUnitTypes(List<TransportUnitType> transportUnitTypes)
TransportUnitType
instances.
The implementation uses the id to find the TransportUnitType
to
be removed and will removed the type when found.
deleteTransportUnitTypes
in interface TransportUnitService<TransportUnit>
transportUnitTypes
- A list of all instances to be deleted.public TransportUnitType saveTransportUnitType(TransportUnitType transportUnitType)
TransportUnitType
.
saveTransportUnitType
in interface TransportUnitService<TransportUnit>
transportUnitType
- The instance to be updated
public void moveTransportUnit(Barcode barcode, LocationPK targetLocationPK)
TransportUnit
identified by its Barcode
to the
given target Location
identified by the LocationPK
.
moveTransportUnit
in interface TransportUnitService<TransportUnit>
barcode
- Barcode
of the TransportUnit
to movetargetLocationPK
- Unique identifier of the target Location
public void deleteTransportUnits(List<TransportUnit> transportUnits)
TransportUnit
s from the persistence
storage. It is not allowed in all cases to delete a TransportUnit
, potentially an active TransportOrder exists or Inventory is still
linked with the transportUnit.
A ServiceRuntimeException is thrown when other TransportUnit
s are
placed on a TransportUnit
that shall be removed. Also
TransportUnit
with active TransportOrders won't be removed, if a
proper delegate exists.
deleteTransportUnits
in interface TransportUnitService<TransportUnit>
transportUnits
- The collection of TransportUnit
s to deletepublic TransportUnitType updateRules(String type, List<LocationType> newAssigned, List<LocationType> newNotAssigned)
TypePlacingRule
s for
the given TransportUnitType
type.
updateRules
in interface TransportUnitService<TransportUnit>
type
- The TransportUnitType
to update.newAssigned
- A new List of LocationType
s that are allowed for the
TransportUnitType
.newNotAssigned
- A List of LocationType
s. All
TypePlacingRule
s will be
removed which have one of this LocationType
s and the
requested TransportUnitType
type.
TransportUnitType
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |