public interface MailboxHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Mailbox objects. Each node in the hierarchy is a unique
Mailbox. The hierarchy may be traversed recursively to establish
the tree structure through getParentMailboxes() and
getChildMailboxes(). To relate these Ids to another
OSID, getMailboxNodes() can be used for retrievals that can
be used for bulk lookups in other OSIDs. Any Mailbox
available in the Mailbox 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 getParentMailboxes() or getChildMailboxes()
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 |
canAccessMailboxHierarchy()
Tests if this user can perform hierarchy queries.
|
MailboxList |
getChildMailboxes(Id mailboxId)
Gets the children of the given mailbox.
|
IdList |
getChildMailboxIds(Id mailboxId)
Gets the child
Ids of the given mailbox. |
Hierarchy |
getMailboxHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getMailboxHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getMailboxNodeIds(Id mailboxId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given mailbox.
|
MailboxNode |
getMailboxNodes(Id mailboxId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given mailbox.
|
MailboxList |
getParentMailboxes(Id mailboxId)
Gets the parents of the given mailbox.
|
IdList |
getParentMailboxIds(Id mailboxId)
Gets the parent
Ids of the given mailbox. |
MailboxList |
getRootMailboxes()
Gets the root mailboxes in the mailbox hierarchy.
|
IdList |
getRootMailboxIds()
Gets the root mailbox
Ids in this hierarchy. |
boolean |
hasChildMailboxes(Id mailboxId)
Tests if a mailbox has any children.
|
boolean |
hasParentMailboxes(Id mailboxId)
Tests if the
Mailbox has any parents. |
boolean |
isAncestorOfMailbox(Id id,
Id mailboxId)
Tests if an
Id is an ancestor of a mailbox. |
boolean |
isChildOfMailbox(Id id,
Id mailboxId)
Tests if a mailbox is a direct child of another.
|
boolean |
isDescendantOfMailbox(Id id,
Id mailboxId)
Tests if an
Id is a descendant of a mailbox. |
boolean |
isParentOfMailbox(Id id,
Id mailboxId)
Tests if an
Id is a direct parent of a mailbox. |
void |
useComparativeMailboxView()
The returns from the mailbox methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryMailboxView()
A complete view of the
Mailbox returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getMailboxHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getMailboxHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessMailboxHierarchy()
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 useComparativeMailboxView()
mandatory - This method is must be implemented. void usePlenaryMailboxView()
Mailbox 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 getRootMailboxIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MailboxList getRootMailboxes() 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 hasParentMailboxes(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Mailbox has any parents.mailboxId - a mailbox Id true if the mailbox has parents, false
otherwiseNotFoundException - mailboxId is not
foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfMailbox(Id id, Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of a mailbox.id - an Id mailboxId - a mailbox Id true if this id is a parent of
mailboxId, false otherwiseNotFoundException - mailboxId is not
foundNullArgumentException - id or
mailboxId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentMailboxIds(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given mailbox.mailboxId - a mailbox Id Ids of the mailboxNotFoundException - mailboxId is not
foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MailboxList getParentMailboxes(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
mailboxId - the Id to queryNotFoundException - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfMailbox(Id id, Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of a mailbox.id - an Id mailboxId - the Id of a mailbox true if this id is an ancestor
of mailboxId, false otherwiseNotFoundException - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildMailboxes(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
mailboxId - a mailboxId true if the mailboxId has
children, false otherwiseNotFoundException - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfMailbox(Id id, Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id mailboxId - the Id of a mailbox true if the id is a child of
mailboxId, false otherwiseNotFoundException - mailboxId not foundNullArgumentException - mailboxId or
id is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildMailboxIds(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given mailbox.mailboxId - the Id to queryNotFoundException - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MailboxList getChildMailboxes(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
mailboxId - the Id to queryNotFoundException - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfMailbox(Id id, Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of a mailbox.id - an Id mailboxId - the Id of a mailbox true if the id is a descendant
of the mailboxId, false
otherwiseNotFoundException - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getMailboxNodeIds(Id mailboxId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
mailboxId - 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 - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MailboxNode getMailboxNodes(Id mailboxId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
mailboxId - 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 - mailboxId not foundNullArgumentException - mailboxId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.