OSID Logo
OSID Specifications
subscription package
Version 3.0.0
Release Candidate Preview
Interfaceosid.subscription.PublisherHierarchySession
Implementsosid.OsidSession
Description

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

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 getParentPublishers() or getChildPublishers() 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: publisher elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
MethodgetPublisherHierarchyId
Description

Gets the hierarchy Id associated with this session.

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

The returns from the publisher 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.
MethodusePlenaryPublisherView
Description

A complete view of the Publisher 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.
MethodgetRootPublisherIds
Description

Gets the root publisher Ids in this hierarchy.

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

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

Returnosid.subscription.PublisherListthe root publishers
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodhasParentPublishers
Description

Tests if the Publisher has any parents.

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

Tests if an Id is a direct parent of publisher.

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

If id not found return false.

MethodgetParentPublisherIds
Description

Gets the parent Ids of the given publisher.

Parametersosid.id.IdpublisherIda publisher Id
Returnosid.id.IdListthe parent Ids of the publisher
ErrorsNOT_FOUND publisherId is not found
NULL_ARGUMENT publisherId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetParentPublishers
Description

Gets the parent publishers of the given id.

Parametersosid.id.IdpublisherIdthe Id of the Publisher to query
Returnosid.subscription.PublisherListthe parent publishers of the id
ErrorsNOT_FOUNDa Publisher identified by Id is not found
NULL_ARGUMENT publisherId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisAncestorOfPublisher
Description

Tests if an Id is an ancestor of a publisher.

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

If id not found return false.

MethodhasChildPublishers
Description

Tests if a publisher has any children.

Parametersosid.id.IdpublisherIda publisher Id
Returnboolean true if the publisherId has children, false otherwise
ErrorsNOT_FOUND publisherId is not found
NULL_ARGUMENT publisherId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisChildOfPublisher
Description

Tests if a publisher is a direct child of another.

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

If id not found return false.

MethodgetChildPublisherIds
Description

Gets the child Ids of the given publisher.

Parametersosid.id.IdpublisherIdthe Id to query
Returnosid.id.IdListthe children of the publisher
ErrorsNOT_FOUND publisherId is not found
NULL_ARGUMENT publisherId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetChildPublishers
Description

Gets the child publishers of the given id.

Parametersosid.id.IdpublisherIdthe Id of the Publisher to query
Returnosid.subscription.PublisherListthe child publishers of the id
ErrorsNOT_FOUNDa Publisher identified by Id is not found
NULL_ARGUMENT publisherId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisDescendantOfPublisher
Description

Tests if an Id is a descendant of a publisher.

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

If id is not found return false.

MethodgetPublisherNodeIds
Description

Gets a portion of the hierarchy for the given publisher.

Parametersosid.id.IdpublisherIdthe 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 publisher node
ErrorsNOT_FOUND publisherId is not found
NULL_ARGUMENT publisherId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetPublisherNodes
Description

Gets a portion of the hierarchy for the given publisher.

Parametersosid.id.IdpublisherIdthe 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.subscription.PublisherNodea publisher node
ErrorsNOT_FOUND publisherId is not found
NULL_ARGUMENT publisherId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.