OSID Logo
OSID Specifications
hierarchy package
Version 3.1.0
Interfaceosid.hierarchy.HierarchyDesignSession
Implementsosid.OsidSession
Used Byosid.hierarchy.HierarchyManager
osid.hierarchy.HierarchyProxyManager
Description

This session provides methods to manage a hierarchy. Each node is expressed as an OSID Id that represents an external object. The hierarchy only expresses relationships among these Ids. However, changing the hierarchy may have implications, such as inherited data, in the associated OSID.

MethodgetHierarchyId
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.
MethodgetHierarchy
Description

Gets the hierarchy associated with this session.

Returnosid.hierarchy.Hierarchy the hierarchy associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanModifyHierarchy
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.
MethodaddRoot
Description

Adds a root node.

Parametersosid.id.Idid the Id of the node
ErrorsALREADY_EXISTS id is already in hierarchy
NOT_FOUND id not found
NULL_ARGUMENT id is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodaddChild
Description

Adds a child to a Id.

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

Removes a root node.

Parametersosid.id.Idid the Id of the node
ErrorsNOT_FOUND id was not found or not in hierarchy
NULL_ARGUMENT id is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodremoveChild
Description

Removes a child from an Id.

Parametersosid.id.Idid the Id of the node
osid.id.IdchildId the Id of the child to remove
ErrorsNOT_FOUND id or childId was not found or childId is not a child of id
NULL_ARGUMENT id or childId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodremoveChildren
Description

Removes all children from an Id.

Parametersosid.id.Idid the Id of the node
ErrorsNOT_FOUND a node identified by the given Id was not found
NULL_ARGUMENT id is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.