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

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

MethodgetStockHierarchyId
Description

Gets the hierarchy Id associated with this session.

Returnosid.id.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetStockHierarchy
Description

Gets the hierarchy associated with this session.

Returnosid.hierarchy.Hierarchythe stock hierarchy
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethodaddRootStock
Description

Adds a root stock.

Parametersosid.id.IdstockIdthe Id of a stock
ErrorsALREADY_EXISTS stockId is already in hierarchy
NOT_FOUND stockId not found
NULL_ARGUMENT stockId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveRootStock
Description

Removes a stock.

Parametersosid.id.IdstockIdthe Id of a stock
ErrorsNOT_FOUND stockId not a root
NULL_ARGUMENT stockId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaddChildStock
Description

Adds a child to a stock.

Parametersosid.id.IdstockIdthe Id of a stock
osid.id.IdchildIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveChildStock
Description

Removes a child from a stock.

Parametersosid.id.IdstockIdthe Id of a stock
osid.id.IdchildIdthe Id of the new child
ErrorsNOT_FOUND stockId is not a parent of childId
NULL_ARGUMENT stockId or childId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveChildStocks
Description

Removes all children from a stock.

Parametersosid.id.IdstockIdthe Id of a stock
ErrorsNOT_FOUND stockId is in hierarchy
NULL_ARGUMENT stockId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.