OSID Logo
OSID Specifications
provisioning package
Version 3.1.0
Interfaceosid.provisioning.DistributorHierarchySession
Implementsosid.OsidSession
Used Byosid.provisioning.ProvisioningManager
osid.provisioning.ProvisioningProxyManager
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.Id the hierarchy Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetDistributorHierarchy
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.
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
Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This method is must be implemented.
MethodgetRootDistributorIds
Description

Gets the root distributor Ids in this hierarchy.

Returnosid.id.IdList the root distributor Ids
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.DistributorList the root distributors
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method is must be implemented.
MethodhasParentDistributors
Description

Tests if the Distributor has any parents.

Parametersosid.id.IddistributorId a distributor Id
Returnboolean true if the distributor has parents, f alse otherwise
ErrorsNOT_FOUND distributorId is not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisParentOfDistributor
Description

Tests if an Id is a direct parent of distributor.

Parametersosid.id.Idid an Id
osid.id.IddistributorId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

If id not found return false.

MethodgetParentDistributorIds
Description

Gets the parent Ids of the given distributor.

Parametersosid.id.IddistributorId a distributor Id
Returnosid.id.IdList the parent Ids of the distributor
ErrorsNOT_FOUND distributorId is not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetParentDistributors
Description

Gets the parents of the given distributor.

Parametersosid.id.IddistributorId the Id to query
Returnosid.provisioning.DistributorList the parents of the distributor
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisAncestorOfDistributor
Description

Tests if an Id is an ancestor of a distributor.

Parametersosid.id.Idid an Id
osid.id.IddistributorId the Id of a distributor
Returnboolean true if this id is an ancestor of distributorId, false otherwise
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId or id is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

If id not found return false.

MethodhasChildDistributors
Description

Tests if a distributor has any children.

Parametersosid.id.IddistributorId a distributor Id
Returnboolean true if the distributorId has children, false otherwise
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisChildOfDistributor
Description

Tests if a distributor is a direct child of another.

Parametersosid.id.Idid an Id
osid.id.IddistributorId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
Provider Notes

If id not found return false.

MethodgetChildDistributorIds
Description

Gets the child Ids of the given distributor.

Parametersosid.id.IddistributorId the Id to query
Returnosid.id.IdList the children of the distributor
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetChildDistributors
Description

Gets the children of the given distributor.

Parametersosid.id.IddistributorId the Id to query
Returnosid.provisioning.DistributorList the children of the distributor
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisDescendantOfDistributor
Description

Tests if an Id is a descendant of a distributor.

Parametersosid.id.Idid an Id
osid.id.IddistributorId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IddistributorId the Id to query
cardinalancestorLevels the maximum number of ancestor levels to include. A value of 0 returns no parents in the distributor.
cardinaldescendantLevels the 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.Node a distributor node
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetDistributorNodes
Description

Gets a portion of the hierarchy for the given distributor.

Parametersosid.id.IddistributorId the Id to query
cardinalancestorLevels the maximum number of ancestor levels to include. A value of 0 returns no parents in the hierarchy.
cardinaldescendantLevels the 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.DistributorNode a distributor node
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.