Interface InventoryWarehouseAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface InventoryWarehouseAssignmentSession extends OsidSession

This session provides methods to re-assign Inventories to Warehouses . An Inventory may appear in multiple Warehouse objects and removing the last reference to an Inventory 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 an Inventory to another Warehouse is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignInventories

      boolean canAssignInventories()
      Tests if this user can alter inventory/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.
    • canAssignInventoriesToWarehouse

      boolean canAssignInventoriesToWarehouse(Id warehouseId)
      Tests if this user can alter inventory/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 inventory 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.
    • getAssignableWarehouseIdsForInventory

      IdList getAssignableWarehouseIdsForInventory(Id warehouseId, Id inventoryId) throws OperationFailedException
      Gets a list of warehouses including and under the given warehouse node in which a specific inventory can be assigned.
      Parameters:
      warehouseId - the Id of the Warehouse
      inventoryId - the Id of the Inventory
      Returns:
      list of assignable warehouse Ids
      Throws:
      NullArgumentException - warehouseId or inventoryId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignInventoryToWarehouse

      void assignInventoryToWarehouse(Id inventoryId, Id warehouseId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Inventory to a Warehouse .
      Parameters:
      inventoryId - the Id of the Inventory
      warehouseId - the Id of the Warehouse
      Throws:
      AlreadyExistsException - inventoryId is already assigned to warehouseId
      NotFoundException - inventoryId or warehouseId not found
      NullArgumentException - inventoryId or warehouseId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignInventoryFromWarehouse

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

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