public interface StockHierarchyDesignSession extends OsidSession
This session defines methods for managing a hierarchy of Stock
objects. Each node in the hierarchy is a unique Stock.
| Modifier and Type | Method and Description |
|---|---|
void |
addChildStock(Id stockId,
Id childId)
Adds a child to a stock.
|
void |
addRootStock(Id stockId)
Adds a root stock.
|
boolean |
canModifyStockHierarchy()
Tests if this user can change the hierarchy.
|
Hierarchy |
getStockHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getStockHierarchyId()
Gets the hierarchy
Id associated with this session. |
void |
removeChildStock(Id stockId,
Id childId)
Removes a child from a stock.
|
void |
removeChildStocks(Id stockId)
Removes all children from a stock.
|
void |
removeRootStock(Id stockId)
Removes a stock.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getStockHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getStockHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canModifyStockHierarchy()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer these operations to an
unauthorized user. false if changing this hierarchy is not
authorized, true otherwisemandatory - This method must be implemented. void addRootStock(Id stockId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
stockId - the Id of a stockAlreadyExistsException - stockId is
already in hierarchyNotFoundException - stockId not foundNullArgumentException - stockId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeRootStock(Id stockId) throws NotFoundException, OperationFailedException, PermissionDeniedException
stockId - the Id of a stockNotFoundException - stockId not a rootNullArgumentException - stockId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addChildStock(Id stockId, Id childId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
stockId - the Id of a stockchildId - the Id of the new childAlreadyExistsException - stockId is
already a parent of childId NotFoundException - stockId or
childId not foundNullArgumentException - stockId or
childId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeChildStock(Id stockId, Id childId) throws NotFoundException, OperationFailedException, PermissionDeniedException
stockId - the Id of a stockchildId - the Id of the new childNotFoundException - stockId is not a
parent of childId NullArgumentException - stockId or
childId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeChildStocks(Id stockId) throws NotFoundException, OperationFailedException, PermissionDeniedException
stockId - the Id of a stockNotFoundException - stockId is in
hierarchyNullArgumentException - stockId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.