OSID Logo
OSID Specifications
hierarchy package
Version 3.0.0
Release Candidate Preview
Interfaceosid.hierarchy.HierarchyDesignSession
Implementsosid.OsidSession
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.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetHierarchy
Description

Gets the hierarchy associated with this session.

Returnosid.hierarchy.Hierarchythe hierarchy associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethodaddRoot
Description

Adds a root node.

Parametersosid.id.Ididthe Id of the node
ErrorsALREADY_EXISTS id is already in hierarchy
NOT_FOUND id not found
NULL_ARGUMENT id is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaddChild
Description

Adds a child to a Id.

Parametersosid.id.Ididthe Id of the node
osid.id.IdchildIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveRoot
Description

Removes a root node.

Parametersosid.id.Ididthe Id of the node
ErrorsNOT_FOUND id was not found or not in hierarchy
NULL_ARGUMENT id is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveChild
Description

Removes a child from an Id.

Parametersosid.id.Ididthe Id of the node
osid.id.IdchildIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveChildren
Description

Removes all children from an Id.

Parametersosid.id.Ididthe Id of the node
ErrorsNOT_FOUNDan node identified by the given Id was not found
NULL_ARGUMENT id is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.