public interface MessageMailboxSession extends OsidSession
This session provides methods to retrieve Message
to
Mailbox
mappings. A Message
may appear in
multiple Mailboxes.
Each Mailbox
may have
its own authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupMessageMailboxMappings()
Tests if this user can perform lookups of message/mailbox mappings.
|
MailboxList |
getMailboxesByMessage(Id messageId)
Gets the list of
Mailbox objects mapped to a
Message. |
IdList |
getMailboxIdsByMessage(Id messageId)
Gets the list of
Mailbox Ids mapped to a
Message. |
IdList |
getMessageIdsByMailbox(Id mailboxId)
Gets the list of
Message Ids associated
with a Mailbox. |
IdList |
getMessageIdsByMailboxes(IdList mailboxIds)
Gets the list of
Message Ids corresponding to a list of
Mailbox objects. |
MessageList |
getMessagesByMailbox(Id mailboxId)
Gets the list of
Messages associated with a
Mailbox. |
MessageList |
getMessagesByMailboxes(IdList mailboxIds)
Gets the list of
Messages corresponding to a list of
Mailboxes. |
void |
useComparativeMailboxView()
The returns from the lookup 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
Message and Mailbox
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupMessageMailboxMappings()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeMailboxView()
mandatory
- This method is must be implemented. void usePlenaryMailboxView()
Message
and 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 getMessageIdsByMailbox(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Message
Ids
associated
with a Mailbox.
mailboxId
- Id
of a Mailbox
Ids
NotFoundException
- mailboxId
is not
foundNullArgumentException
- mailboxId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MessageList getMessagesByMailbox(Id mailboxId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Messages
associated with a
Mailbox.
mailboxId
- Id
of a Mailbox
NotFoundException
- mailboxId
is not
foundNullArgumentException
- mailboxId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getMessageIdsByMailboxes(IdList mailboxIds) throws OperationFailedException, PermissionDeniedException
Message Ids
corresponding to a list of
Mailbox
objects.mailboxIds
- list of mailbox Ids
Ids
NullArgumentException
- mailboxIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MessageList getMessagesByMailboxes(IdList mailboxIds) throws OperationFailedException, PermissionDeniedException
Messages
corresponding to a list of
Mailboxes.
mailboxIds
- list of mailbox Ids
NullArgumentException
- mailboxIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getMailboxIdsByMessage(Id messageId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Mailbox
Ids
mapped to a
Message.
messageId
- Id
of a Message
Ids
NotFoundException
- messageId
is not
foundNullArgumentException
- messageId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. MailboxList getMailboxesByMessage(Id messageId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Mailbox
objects mapped to a
Message.
messageId
- Id
of a Message
NotFoundException
- messageId
is not
foundNullArgumentException
- messageId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.