OSID Logo
OSID Specifications
metering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.metering.UtilityHierarchyDesignSession
Implementsosid.OsidSession
Description

This session manages a hierarchy of utilities. Utilities may be organized into a hierarchy for organizing or federating. A parent Utility includes all of the Ids of its children such that a single root node contains all of the Ids of the federation.

MethodgetUtilityHierarchyId
Description

Gets the hierarchy Id associated with this session.

Returnosid.id.Idthe hierarchy Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetUtilityHierarchy
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.
MethodcanModifyUtilityHierarchy
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.
MethodaddRootUtility
Description

Adds a root utility.

Parametersosid.id.IdutilityIdthe Id of a utility
ErrorsALREADY_EXISTS utilityId is already in hierarchy
NOT_FOUND utilityId not found
NULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveRootUtility
Description

Removes a root utility.

Parametersosid.id.IdutilityIdthe Id of a utility
ErrorsNOT_FOUND utilityId is not a root
NULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaddChildUtility
Description

Adds a child to a utility.

Parametersosid.id.IdutilityIdthe Id of a utility
osid.id.IdchildIdthe Id of the new child
ErrorsALREADY_EXISTS utilityId is already a parent of childId
NOT_FOUND utilityId or childId not found
NULL_ARGUMENT utilityId or childId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveChildUtility
Description

Removes a child from a utility.

Parametersosid.id.IdutilityIdthe Id of a utility
osid.id.IdchildIdthe Id of the new child
ErrorsNOT_FOUND utilityId not a parent of childId
NULL_ARGUMENT utilityId or childId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveChildUtilities
Description

Removes all children from a utility.

Parametersosid.id.IdutilityIdthe Id of a utility
ErrorsNOT_FOUND utilityId not found
NULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.