Interface | osid.inventory.StockAdminSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session creates, updates, and deletes Create and update operations differ in their usage. To
create a For updates, The delete operations delete This session includes an | ||
Method | getWarehouseId | ||
Description |
Gets the | ||
Return | osid.id.Id | the Warehouse Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getWarehouse | ||
Description |
Gets the | ||
Return | osid.inventory.Warehouse | the warehouse | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canCreateStocks | ||
Description |
Tests if this user can create | ||
Return | boolean | false if Stock creation is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | canCreateStockWithRecordTypes | ||
Description |
Tests if this user can create a single | ||
Parameters | osid.type.Type[] | stockRecordTypes | array of stock record types |
Return | boolean | true if Stock creation using the specified
record Types is supported, false otherwise | |
Errors | NULL_ARGUMENT | stockRecordTypes is null | |
Compliance | mandatory | This method must be implemented. | |
Method | getStockFormForCreate | ||
Description |
Gets the stock form for creating new stocks. A new form should be requested for each create transaction. | ||
Parameters | osid.type.Type[] | stockRecordTypes | array of stock record types |
Return | osid.inventory.StockForm | the stock form | |
Errors | NULL_ARGUMENT | stockRecordTypes is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | unable to get form for requested record types | ||
Compliance | mandatory | This method must be implemented. | |
Method | createStock | ||
Description |
Creates a new | ||
Parameters | osid.inventory.StockForm | stockForm | the form for this Stock |
Return | osid.inventory.Stock | the new Stock | |
Errors | ILLEGAL_STATE | stockForm already used in a create transaction | |
INVALID_ARGUMENT | one or more of the form elements is invalid | ||
NULL_ARGUMENT | courseId, termId , or stockForm is
null | ||
NOT_FOUND | stockForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | stockForm did not originate from
getStockFormForCreate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canUpdateStocks | ||
Description |
Tests if this user can update | ||
Return | boolean | false if Stock modification is not
authorized, true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getStockFormForUpdate | ||
Description |
Gets the stock form for updating an existing stock. A new stock form should be requested for each update transaction. | ||
Parameters | osid.id.Id | stockId | the Id of the Stock |
Return | osid.inventory.StockForm | the stock form | |
Errors | NOT_FOUND | stockId is not found | |
NULL_ARGUMENT | stockId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | updateStock | ||
Description |
Updates an existing stock. | ||
Parameters | osid.inventory.StockForm | stockForm | the form containing the elements to be updated |
Errors | ILLEGAL_STATE | stockForm already used in an update transaction | |
INVALID_ARGUMENT | the form contains an invalid value | ||
NULL_ARGUMENT | stockForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | stockForm did not originate from
getStockFormForUpdate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canDeleteStocks | ||
Description |
Tests if this user can delete | ||
Return | boolean | false if Stock deletion is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | deleteStock | ||
Description |
Deletes a | ||
Parameters | osid.id.Id | stockId | the Id of the Stock to remove |
Errors | NOT_FOUND | stockId not found | |
NULL_ARGUMENT | stockId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canManageStockAliases | ||
Description |
Tests if this user can manage | ||
Return | boolean | false if Stock aliasing is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | aliasStock | ||
Description |
Adds an | ||
Parameters | osid.id.Id | stockId | the Id of a Stock |
osid.id.Id | aliasId | the alias Id | |
Errors | ALREADY_EXISTS | aliasId is in use as a primary Id | |
NOT_FOUND | stockId not found | ||
NULL_ARGUMENT | stockId or aliasId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |