public interface PublisherHierarchySession extends OsidSession
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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAccessPublisherHierarchy()
Tests if this user can perform hierarchy queries.
|
IdList |
getChildPublisherIds(Id publisherId)
Gets the child
Ids of the given publisher. |
PublisherList |
getChildPublishers(Id publisherId)
Gets the child publishers of the given
id. |
IdList |
getParentPublisherIds(Id publisherId)
Gets the parent
Ids of the given publisher. |
PublisherList |
getParentPublishers(Id publisherId)
Gets the parent publishers of the given
id. |
Hierarchy |
getPublisherHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getPublisherHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getPublisherNodeIds(Id publisherId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given publisher.
|
PublisherNode |
getPublisherNodes(Id publisherId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given publisher.
|
IdList |
getRootPublisherIds()
Gets the root publisher
Ids in this hierarchy. |
PublisherList |
getRootPublishers()
Gets the root publishers in the publisher hierarchy.
|
boolean |
hasChildPublishers(Id publisherId)
Tests if a publisher has any children.
|
boolean |
hasParentPublishers(Id publisherId)
Tests if the
Publisher has any parents. |
boolean |
isAncestorOfPublisher(Id id,
Id publisherId)
Tests if an
Id is an ancestor of a publisher. |
boolean |
isChildOfPublisher(Id id,
Id publisherId)
Tests if a publisher is a direct child of another.
|
boolean |
isDescendantOfPublisher(Id id,
Id publisherId)
Tests if an
Id is a descendant of a publisher. |
boolean |
isParentOfPublisher(Id id,
Id publisherId)
Tests if an
Id is a direct parent of publisher. |
void |
useComparativePublisherView()
The returns from the publisher methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryPublisherView()
A complete view of the
Publisher returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getPublisherHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getPublisherHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessPublisherHierarchy()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations. false if hierarchy traversal methods are not
authorized, true otherwisemandatory - This method must be implemented. void useComparativePublisherView()
mandatory - This method is must be implemented. void usePlenaryPublisherView()
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.mandatory - This method is must be implemented. IdList getRootPublisherIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PublisherList getRootPublishers() throws OperationFailedException, PermissionDeniedException
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.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. boolean hasParentPublishers(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Publisher has any parents.publisherId - a publisher Id true if the publisher has parents, f
alse otherwiseNotFoundException - publisherId is not
foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfPublisher(Id id, Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of publisher.id - an Id publisherId - the Id of a publisher true if this id is a parent of
publisherId, f alse otherwiseNotFoundException - publisherId is not
foundNullArgumentException - id or
publisherId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentPublisherIds(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given publisher.publisherId - a publisher Id Ids of the publisherNotFoundException - publisherId is not
foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PublisherList getParentPublishers(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. publisherId - the Id of the Publisher
to query id NotFoundException - a Publisher
identified by Id is not foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfPublisher(Id id, Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of a publisher.id - an Id publisherId - the Id of a publisher tru e if this id is an ancestor
of publisherId, false otherwiseNotFoundException - publisherId is not
foundNullArgumentException - id or
publisherId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildPublishers(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
publisherId - a publisher Id true if the publisherId has
children, false otherwiseNotFoundException - publisherId is not
foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfPublisher(Id id, Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id publisherId - the Id of a publisher true if the id is a child of
publisherId, false otherwiseNotFoundException - publisherId is not
foundNullArgumentException - id or
publisherId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildPublisherIds(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given publisher.publisherId - the Id to queryNotFoundException - publisherId is not
foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PublisherList getChildPublishers(Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. publisherId - the Id of the Publisher
to query id NotFoundException - a Publisher
identified by Id is not foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfPublisher(Id id, Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of a publisher.id - an Id publisherId - the Id of a publisher true if the id is a descendant
of the publisherId, false
otherwiseNotFoundException - publisherId is not
foundNullArgumentException - id or
publisherId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getPublisherNodeIds(Id publisherId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
publisherId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - publisherId is not
foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PublisherNode getPublisherNodes(Id publisherId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
publisherId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - publisherId is not
foundNullArgumentException - publisherId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.