OSID Logo
OSID Specifications
provisioning package
Version 3.0.0
Release Candidate Preview
Interfaceosid.provisioning.DistributorHierarchySession
Implementsosid.OsidSession
Description

This session defines methods for traversing a hierarchy of Distributor objects. Each node in the hierarchy is a unique Distributor. The hierarchy may be traversed recursively to establish the tree structure through getParentDistributors() and getChildDistributors(). To relate these Ids to another OSID, getDistributorNodes() can be used for retrievals that can be used for bulk lookups in other OSIDs. Any Distributor available in the Provisioning OSID is known to this hierarchy but does not appear in the hierarchy traversal until added as a root distributor or a child of another distributor.

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 getParentDistributors() or getChildDistributors() in lieu of a PERMISSION_DENIED error that may disrupt the traversal through authorized provisionways.

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

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

Gets the hierarchy Id associated with this session.

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

The returns from the distributor 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.
MethodusePlenaryDistributorView
Description

A complete view of the Distributors 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.
MethodgetRootDistributorIds
Description

Gets the root distributor Ids in this hierarchy.

Returnosid.id.IdListthe root distributor Ids
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRootDistributors
Description

Gets the root distributor in the distributor hierarchy. A distributor with no parents is an orphan. While all distributor Ids are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root distributor or child of another distributor.

Returnosid.provisioning.DistributorListthe root distributors
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodhasParentDistributors
Description

Tests if the Distributor has any parents.

Parametersosid.id.IddistributorIda distributor Id
Returnboolean true if the distributor has parents, f alse otherwise
ErrorsNOT_FOUND distributorId is not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisParentOfDistributor
Description

Tests if an Id is a direct parent of distributor.

Parametersosid.id.Ididan Id
osid.id.IddistributorIdthe Id of a distributor
Returnboolean true if this id is a parent of distributorId, f alse otherwise
ErrorsNOT_FOUND distributorId is not found
NULL_ARGUMENT id or distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodgetParentDistributorIds
Description

Gets the parent Ids of the given distributor.

Parametersosid.id.IddistributorIda distributor Id
Returnosid.id.IdListthe parent Ids of the distributor
ErrorsNOT_FOUND distributorId is not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetParentDistributors
Description

Gets the parents of the given distributor.

Parametersosid.id.IddistributorIdthe Id to query
Returnosid.provisioning.DistributorListthe parents of the distributor
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisAncestorOfDistributor
Description

Tests if an Id is an ancestor of a distributor.

Parametersosid.id.Ididan Id
osid.id.IddistributorIdthe Id of a distributor
Returnboolean tru e if this id is an ancestor of distributorId, false otherwise
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId or id is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodhasChildDistributors
Description

Tests if a distributor has any children.

Parametersosid.id.IddistributorIda distributor Id
Returnboolean true if the distributorId has children, false otherwise
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisChildOfDistributor
Description

Tests if a distributor is a direct child of another.

Parametersosid.id.Ididan Id
osid.id.IddistributorIdthe Id of a distributor
Returnboolean true if the id is a child of distributorId, false otherwise
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT id or distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id not found return false.

MethodgetChildDistributorIds
Description

Gets the child Ids of the given distributor.

Parametersosid.id.IddistributorIdthe Id to query
Returnosid.id.IdListthe children of the distributor
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetChildDistributors
Description

Gets the children of the given distributor.

Parametersosid.id.IddistributorIdthe Id to query
Returnosid.provisioning.DistributorListthe children of the distributor
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisDescendantOfDistributor
Description

Tests if an Id is a descendant of a distributor.

Parametersosid.id.Ididan Id
osid.id.IddistributorIdthe Id of a distributor
Returnboolean true if the id is a descendant of the distributorId, false otherwise
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT id or distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
Provider Notes

If id is not found return false.

MethodgetDistributorNodeIds
Description

Gets a portion of the hierarchy for the given distributor.

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

Gets a portion of the hierarchy for the given distributor.

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