OSID Logo
OSID Specifications
resource package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resource.GroupHierarchySession
Implementsosid.OsidSession
Description

This session provides a hierarchical view of resource groups. Each node in the hierarchy is a unique Resource. The hierarchy may be traversed recursively to establish the tree structure through getParentResources() and getChildResources(). To relate these Ids to another OSID, getResourceNodes() can be used for retrievals that can be used for bulk lookups in other OSIDs.

A user may not be authorized to traverse the entire hierarchy. Parts of the hierarchy may be made invisible through omission from the returns of getParentResources() or getChildResources() in lieu of a PERMISSION_DENIED error that may disrupt the traversal through authorized pathways.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: resource elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
MethodgetBinId
Description

Gets the Bin Id associated with this session.

Returnosid.id.Idthe Bin Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBin
Description

Gets the Bin associated with this session.

Returnosid.resource.Binthe Bin associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanAccessGroupHierarchy
Description

Tests if this user can perform hierarchy queries. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if hierarchy traversal methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeResourceView
Description

The returns from the group methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryResourceView
Description

A complete view of the Resource returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedBinView
Description

Federates the view for methods in this session. A federated view will include resources in bins which are children of this bin in the bin hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedBinView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this bin only.

CompliancemandatoryThis method is must be implemented.
MethodisMemberOfGroup
Description

Tests if a resource Id is a member of a group either directly or indirectly through nested groups.

Parametersosid.id.IdgroupIda resource group Id
osid.id.IdresourceIdthe Id of a resource
Returnboolean true if this resourceId is a member of groupId, f alse otherwise
ErrorsNOT_FOUND groupId is not found
NULL_ARGUMENT groupId or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If resourceId not found return false.

MethodgetResourceNodeIds
Description

Gets a portion of the hierarchy for the given resource group.

Parametersosid.id.IdresourceIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the node.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the node.
booleanincludeSiblings true to include the siblings of the given node, false to omit the siblings
Returnosid.hierarchy.Nodea resource node
ErrorsNOT_FOUND resourceId is not found
NULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetResourceNodes
Description

Gets a portion of the hierarchy for the given resource group.

Parametersosid.id.IdresourceIdthe Id to query
cardinalancestorLevelsthe maximum number of ancestor levels to include. A value of 0 returns no parents in the node.
cardinaldescendantLevelsthe maximum number of descendant levels to include. A value of 0 returns no children in the node.
booleanincludeSiblings true to include the siblings of the given node, false to omit the siblings
Returnosid.acknowledgement.BillingNodea resource node
ErrorsNOT_FOUND resourceId is not found
NULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.