Interface ShipmentWarehouseAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ShipmentWarehouseAssignmentSession extends 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 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignShipmentToWarehouse

      boolean canAssignShipmentToWarehouse(Id warehouseId)
      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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Parameters:
      warehouseId - the Id of the Warehouse
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - warehouseId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableWarehouseIds

      IdList getAssignableWarehouseIds(Id warehouseId) throws OperationFailedException
      Gets a list of warehouses including and under the given warehouse node in which any shipment can be assigned.
      Parameters:
      warehouseId - the Id of the Warehouse
      Returns:
      list of assignable warehouse Ids
      Throws:
      NullArgumentException - warehouseId is null
      OperationFailedException - 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 - the Id of the Warehouse
      shipmentId - the Id of the Shipment
      Returns:
      list of assignable warehouse Ids
      Throws:
      NullArgumentException - warehouseId or shipmentId is null
      OperationFailedException - 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 existing Shipment to a Warehouse .
      Parameters:
      shipmentId - the Id of the Shipment
      warehouseId - the Id of the Warehouse
      Throws:
      AlreadyExistsException - shipmentId is already assigned to warehouseId
      NotFoundException - shipmentId or warehouseId not found
      NullArgumentException - shipmentId or warehouseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignShipmentFromWarehouse

      void unassignShipmentFromWarehouse(Id shipmentId, Id warehouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Shipment from a Warehouse .
      Parameters:
      shipmentId - the Id of the Shipment
      warehouseId - the Id of the Warehouse
      Throws:
      NotFoundException - shipmentId or warehouseId not found or shipmentId not assigned to warehouseId
      NullArgumentException - shipmentId or warehouseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignShipmentToWarehouse

      void reassignShipmentToWarehouse(Id shipmentId, Id fromWarehouseId, Id toWarehouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Shipment from one Warehouse to another. Mappings to other Warehouses are unaffected.
      Parameters:
      shipmentId - the Id of the Shipment
      fromWarehouseId - the Id of the current Warehouse
      toWarehouseId - the Id of the destination Warehouse
      Throws:
      AlreadyExistsException - shipmentId already assigned to toWarehouseId
      NotFoundException - shipmentId, fromWarehouseId , or toWarehouseId not found or shipmentId not mapped to fromWarehouseId
      NullArgumentException - shipmentId, fromWarehouseId , or toWarehouseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.