OSID Logo
OSID Specifications
inventory package
Version 3.1.0
Interfaceosid.inventory.StockHierarchyDesignSession
Implementsosid.OsidSession
Used Byosid.inventory.InventoryManager
osid.inventory.InventoryProxyManager
Description

This session defines methods for managing a hierarchy of Stocks. Each node in the hierarchy is a unique Stock.

MethodgetStockHierarchyId
Description

Gets the hierarchy Id associated with this session.

Returnosid.id.Id the hierarchy Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetStockHierarchy
Description

Gets the hierarchy associated with this session.

Returnosid.hierarchy.Hierarchy the stock hierarchy
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanModifyStockHierarchy
Description

Tests if this user can change the hierarchy. A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.

Returnboolean false if changing this hierarchy is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaddRootStock
Description

Adds a root stock.

Parametersosid.id.IdstockId the Id of a stock
ErrorsALREADY_EXISTS stockId is already in hierarchy
NOT_FOUND stockId not found
NULL_ARGUMENT stockId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodremoveRootStock
Description

Removes a stock.

Parametersosid.id.IdstockId the Id of a stock
ErrorsNOT_FOUND stockId not a root
NULL_ARGUMENT stockId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodaddChildStock
Description

Adds a child to a stock.

Parametersosid.id.IdstockId the Id of a stock
osid.id.IdchildId the Id of the new child
ErrorsALREADY_EXISTS stockId is already a parent of childId
NOT_FOUND stockId or childId not found
NULL_ARGUMENT stockId or childId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodremoveChildStock
Description

Removes a child from a stock.

Parametersosid.id.IdstockId the Id of a stock
osid.id.IdchildId the Id of the new child
ErrorsNOT_FOUND stockId is not a parent of childId
NULL_ARGUMENT stockId or childId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodremoveChildStocks
Description

Removes all children from a stock.

Parametersosid.id.IdstockId the Id of a stock
ErrorsNOT_FOUND stockId is in hierarchy
NULL_ARGUMENT stockId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.