OSID Logo
OSID Specifications
inventory package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.WarehouseAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Warehouses. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Warehouse, a WarehouseForm is requested using getWarehouseFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned WarehouseForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the WarehouseForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each WarehouseForm corresponds to an attempted transaction.

For updates, WarehouseForms are requested to the Warehouse Id that is to be updated using getWarehouseFormForUpdate(). Similarly, the WarehouseForm has metadata about the data that can be updated and it can perform validation before submitting the update. The WarehouseForm can only be used once for a successful update and cannot be reused.

The delete operations delete Warehouses.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodcanCreateWarehouses
Description

Tests if this user can create Warehouses. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Warehouse. will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.

Returnboolean false if Warehouse creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateWarehouseWithRecordTypes
Description

Tests if this user can create a single Warehouse using the desired record types. While InventoryManager.getWarehouseRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Warehouse. Providing an empty array tests if a Warehouse can be created with no records.

Parametersosid.type.Type[]warehouseRecordTypesarray of warehouse record types
Returnboolean true if Warehouse creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT warehouseRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetWarehouseFormForCreate
Description

Gets the warehouse form for creating new warehouses. A new form should be requested for each create transaction.

Parametersosid.type.Type[]warehouseRecordTypesarray of warehouse record types
Returnosid.inventory.WarehouseFormthe warehouse form
ErrorsNULL_ARGUMENT warehouseRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateWarehouse
Description

Creates a new Warehouse.

Parametersosid.inventory.WarehouseFormwarehouseFormthe form for this Warehouse
Returnosid.inventory.Warehousethe new Warehouse
ErrorsILLEGAL_STATE warehouseForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT warehouseForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED warehouseForm did not originate from getWarehouseFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateWarehouses
Description

Tests if this user can update Warehouses. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Warehouse will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.

Returnboolean false if Warehouse modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetWarehouseFormForUpdate
Description

Gets the warehouse form for updating an existing warehouse. A new warehouse form should be requested for each update transaction.

Parametersosid.id.IdwarehouseIdthe Id of the Warehouse
Returnosid.inventory.WarehouseFormthe warehouse form
ErrorsNOT_FOUND warehouseId is not found
NULL_ARGUMENT warehouseId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateWarehouse
Description

Updates an existing warehouse.

Parametersosid.inventory.WarehouseFormwarehouseFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE warehouseForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT warehouseForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED warehouseForm did not originate from getWarehouseFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteWarehouses
Description

Tests if this user can delete Warehouses. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Warehouse will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

Returnboolean false if Warehouse deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteWarehouse
Description

Deletes a Warehouse.

Parametersosid.id.IdwarehouseIdthe Id of the Warehouse to remove
ErrorsNOT_FOUND warehouseId not found
NULL_ARGUMENT warehouseId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageWarehouseAliases
Description

Tests if this user can manage Id aliases for Warehouses. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Warehouse aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasWarehouse
Description

Adds an Id to a Warehouse for the purpose of creating compatibility. The primary Id of the Warehouse is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another warehouse, it is reassigned to the given warehouse Id.

Parametersosid.id.IdwarehouseIdthe Id of a Warehouse
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND aliasId is in use as a primary Id
NULL_ARGUMENT warehouseId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.