Interface ShipmentWarehouseAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Shipments to
Warehouses . A Shipment may appear in multiple Warehouse
objects and removing the last reference to a Shipment is the
equivalent of deleting it. Each Warehouse may have its own
authorizations governing who is allowed to operate on it.
Adding a reference of a Shipment to another Warehouse
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignShipmentToWarehouse(Id shipmentId, Id warehouseId) Adds an existingShipmentto aWarehouse.booleanTests if this user can alter shipment/warehouse mappings.booleancanAssignShipmentToWarehouse(Id warehouseId) Tests if this user can alter shipment/warehouse mappings.getAssignableWarehouseIds(Id warehouseId) Gets a list of warehouses including and under the given warehouse node in which any shipment can be assigned.getAssignableWarehouseIdsForShipment(Id warehouseId, Id shipmentId) Gets a list of warehouses including and under the given warehouse node in which a specific shipment can be assigned.voidreassignShipmentToWarehouse(Id shipmentId, Id fromWarehouseId, Id toWarehouseId) Moves aShipmentfrom oneWarehouseto another.voidunassignShipmentFromWarehouse(Id shipmentId, Id warehouseId) Removes aShipmentfrom aWarehouse.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignShipments
boolean canAssignShipments()Tests if this user can alter shipment/warehouse mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignShipmentToWarehouse
Tests if this user can alter shipment/warehouse mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
warehouseId- theIdof theWarehouse- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-warehouseIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableWarehouseIds
Gets a list of warehouses including and under the given warehouse node in which any shipment can be assigned.- Parameters:
warehouseId- theIdof theWarehouse- Returns:
- list of assignable warehouse
Ids - Throws:
NullArgumentException-warehouseIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableWarehouseIdsForShipment
IdList getAssignableWarehouseIdsForShipment(Id warehouseId, Id shipmentId) throws OperationFailedException Gets a list of warehouses including and under the given warehouse node in which a specific shipment can be assigned.- Parameters:
warehouseId- theIdof theWarehouseshipmentId- theIdof theShipment- Returns:
- list of assignable warehouse
Ids - Throws:
NullArgumentException-warehouseIdorshipmentIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignShipmentToWarehouse
void assignShipmentToWarehouse(Id shipmentId, Id warehouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingShipmentto aWarehouse.- Parameters:
shipmentId- theIdof theShipmentwarehouseId- theIdof theWarehouse- Throws:
AlreadyExistsException-shipmentIdis already assigned towarehouseIdNotFoundException-shipmentIdorwarehouseIdnot foundNullArgumentException-shipmentIdorwarehouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignShipmentFromWarehouse
void unassignShipmentFromWarehouse(Id shipmentId, Id warehouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aShipmentfrom aWarehouse.- Parameters:
shipmentId- theIdof theShipmentwarehouseId- theIdof theWarehouse- Throws:
NotFoundException-shipmentIdorwarehouseIdnot found orshipmentIdnot assigned towarehouseIdNullArgumentException-shipmentIdorwarehouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignShipmentToWarehouse
void reassignShipmentToWarehouse(Id shipmentId, Id fromWarehouseId, Id toWarehouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aShipmentfrom oneWarehouseto another. Mappings to otherWarehousesare unaffected.- Parameters:
shipmentId- theIdof theShipmentfromWarehouseId- theIdof the currentWarehousetoWarehouseId- theIdof the destinationWarehouse- Throws:
AlreadyExistsException-shipmentIdalready assigned totoWarehouseIdNotFoundException-shipmentId, fromWarehouseId, ortoWarehouseIdnot found orshipmentIdnot mapped tofromWarehouseIdNullArgumentException-shipmentId, fromWarehouseId, ortoWarehouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-