public interface MessageLookupSession extends OsidSession
This session defines methods for retrieving messages.
This lookup session defines several views:
Messages with the MessageAdminSession. The methods useFederatedMailboxView() and
useIsolatedMailboxView() behave as a radio group and one should be
selected before invoking any lookup methods.
Messages may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Message.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupMessages()
Tests if this user can perform
Message lookups. |
Mailbox |
getMailbox()
Gets the
Mailbox associated with this session. |
Id |
getMailboxId()
Gets the
Mailbox Id associated with this
session. |
Message |
getMessage(Id messageId)
Gets the
Message specified by its Id. |
MessageList |
getMessages()
Gets all
Messages. |
MessageList |
getMessagesByGenusType(Type messageGenusType)
Gets a
MessageList corresponding to the given message
genus Type which does not include messages of types
derived from the specified Type. |
MessageList |
getMessagesByGenusTypeForRecipient(Id resourceId,
Type messageGenusType)
Gets a
MessageList received by the specified recipient. |
MessageList |
getMessagesByGenusTypeFromSender(Id resourceId,
Type messageGenusType)
Gets a
MessageList of the given genus type and sender. |
MessageList |
getMessagesByGenusTypeFromSenderForRecipient(Id senderResourceId,
Id recipientResourceId,
Type messageGenusType)
Gets a
MessageList of the given genus type sent by the
specified sender and received by the specified recipient. |
MessageList |
getMessagesByIds(IdList messageIds)
Gets a
MessageList corresponding to the given
IdList. |
MessageList |
getMessagesByParentGenusType(Type messageGenusType)
Gets a
MessageList corresponding to the given message
genus Type and include any additional messages with
genus types derived from the specified Type. |
MessageList |
getMessagesByReceivedTimeAndGenusTypeForRecipient(Id resourceId,
Type messageGenusType,
DateTime from,
DateTime to)
Gets a
MessageList of the given genus type received by
the specified resource and received time. |
MessageList |
getMessagesByReceivedTimeAndGenusTypeFromSenderForRecipient(Id senderResourceId,
Id recipientResourceId,
Type messageGenusType,
DateTime from,
DateTime to)
Gets a
MessageList of the given genus type and received
by the specified resource and received time. |
MessageList |
getMessagesByReceivedTimeForRecipient(Id resourceId,
DateTime from,
DateTime to)
Gets a
MessageList received by the specified resource
and received time. |
MessageList |
getMessagesByReceivedTimeFromSenderForRecipient(Id senderResourceId,
Id recipientResourceId,
DateTime from,
DateTime to)
Gets a
MessageList by the specified sender, recipient,
and received time. |
MessageList |
getMessagesByRecordType(Type messageRecordType)
Gets a
MessageList containing the given message record
Type. |
MessageList |
getMessagesBySentTime(DateTime from,
DateTime to)
Gets a
MessageList sent within the specified range
inclusive. |
MessageList |
getMessagesBySentTimeAndGenusType(Type messageGenusType,
DateTime from,
DateTime to)
Gets a
MessageList of the given genus type and sent
within the specified range inclusive. |
MessageList |
getMessagesBySentTimeAndGenusTypeFromSender(Id resourceId,
Type messageGenusType,
DateTime from,
DateTime to)
Gets a
MessageList of the given genus type and sent
within the specified range inclusive. |
MessageList |
getMessagesBySentTimeFromSender(Id resourceId,
DateTime from,
DateTime to)
Gets a
MessageList sent by the specified sender and
sent time. |
MessageList |
getMessagesForRecipient(Id resourceId)
Gets a
MessageList received by the specified recipient. |
MessageList |
getMessagesFromSender(Id resourceId)
Gets a
MessageList sent by the specified sender. |
MessageList |
getMessagesFromSenderForRecipient(Id senderResourceId,
Id recipientResourceId)
Gets a
MessageList sent by the specified sender and
received by the specified recipient. |
void |
useComparativeMessageView()
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 |
useFederatedMailboxView()
Federates the view for methods in this session.
|
void |
useIsolatedMailboxView()
Isolates the view for methods in this session.
|
void |
usePlenaryMessageView()
A complete view of the
Message returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getMailboxId()
Mailbox Id associated with this
session. Mailbox Id associated with this sessionmandatory - This method must be implemented. Mailbox getMailbox() throws OperationFailedException, PermissionDeniedException
Mailbox associated with this session. Mailbox associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupMessages()
Message lookups. 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. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeMessageView()
mandatory - This method is must be implemented. void usePlenaryMessageView()
Message 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. void useFederatedMailboxView()
mandatory - This method is must be implemented. void useIsolatedMailboxView()
mandatory - This method is must be implemented. Message getMessage(Id messageId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Message specified by its Id. In
plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Message
may have a different Id than requested, such as
the case where a duplicate Id was assigned to a
Message and retained for compatibility.messageId - the Id of the Message
to retrieve Message NotFoundException - no Message found
with the given Id NullArgumentException - messageId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByIds(IdList messageIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
MessageList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
messages specified in the Id list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Messages may be omitted from the list and
may present the elements in any order including returning a unique
set.messageIds - the list of Ids to retrieve Message list NotFoundException - an Id was not foundNullArgumentException - messageIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByGenusType(Type messageGenusType) throws OperationFailedException, PermissionDeniedException
MessageList corresponding to the given message
genus Type which does not include messages of types
derived from the specified Type. In plenary mode, the
returned list contains all known messages or an error results.
Otherwise, the returned list may contain only those messages that are
accessible through this session.messageGenusType - a message genus type Message listNullArgumentException - messageGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByParentGenusType(Type messageGenusType) throws OperationFailedException, PermissionDeniedException
MessageList corresponding to the given message
genus Type and include any additional messages with
genus types derived from the specified Type. In plenary
mode, the returned list contains all known messages or an error
results. Otherwise, the returned list may contain only those messages
that are accessible through this sessionmessageGenusType - a message genus type Message listNullArgumentException - messageGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByRecordType(Type messageRecordType) throws OperationFailedException, PermissionDeniedException
MessageList containing the given message record
Type. In plenary mode, the returned list contains all
known messages or an error results. Otherwise, the returned list may
contain only those messages that are accessible through this session.messageRecordType - a message record type Message listNullArgumentException - messageRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesBySentTime(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList sent within the specified range
inclusive. In plenary mode, the returned list contains all known
messages or an error results. Otherwise, the returned list may contain
only those messages that are accessible through this session.from - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - from or
to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesBySentTimeAndGenusType(Type messageGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList of the given genus type and sent
within the specified range inclusive. In plenary mode, the returned
list contains all known messages or an error results. Otherwise, the
returned list may contain only those messages that are accessible
through this session.messageGenusType - a message genus typefrom - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - messageGenusType, from
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesFromSender(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageList sent by the specified sender. In
plenary mode, the returned list contains all known messages or an
error results. Otherwise, the returned list may contain only those
messages that are accessible through this session.resourceId - a resource Id Message listNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByGenusTypeFromSender(Id resourceId, Type messageGenusType) throws OperationFailedException, PermissionDeniedException
MessageList of the given genus type and sender.
In plenary mode, the returned list contains all known messages or an
error results. Otherwise, the returned list may contain only those
messages that are accessible through this session.resourceId - a resource IdmessageGenusType - a message genus type Message listNullArgumentException - resourceId or
messageGenusType is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesBySentTimeFromSender(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList sent by the specified sender and
sent time. In plenary mode, the returned list contains all known
messages or an error results. Otherwise, the returned list may contain
only those messages that are accessible through this sessionresourceId - a resource Idfrom - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - resourceId, from
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesBySentTimeAndGenusTypeFromSender(Id resourceId, Type messageGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList of the given genus type and sent
within the specified range inclusive. In plenary mode, the returned
list contains all known messages or an error results. Otherwise, the
returned list may contain only those messages that are accessible
through this session.resourceId - a resource IdmessageGenusType - a message genus typefrom - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - resourceId,
messageGenusType, from or to is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException
MessageList received by the specified recipient.
In plenary mode, the returned list contains all known messages or an
error results. Otherwise, the returned list may contain only those
messages that are accessible through this session.resourceId - a resource Id Message listNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByGenusTypeForRecipient(Id resourceId, Type messageGenusType) throws OperationFailedException, PermissionDeniedException
MessageList received by the specified recipient.
In plenary mode, the returned list contains all known messages or an
error results. Otherwise, the returned list may contain only those
messages that are accessible through this session.resourceId - a resource IdmessageGenusType - a message genus type Message listNullArgumentException - resourceId or
messageGenusType is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByReceivedTimeForRecipient(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList received by the specified resource
and received time. In plenary mode, the returned list contains all
known messages or an error results. Otherwise, the returned list may
contain only those messages that are accessible through this session.resourceId - a resource Idfrom - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - resourceId, from
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByReceivedTimeAndGenusTypeForRecipient(Id resourceId, Type messageGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList of the given genus type received by
the specified resource and received time. In plenary mode, the
returned list contains all known messages or an error results.
Otherwise, the returned list may contain only those messages that are
accessible through this session.resourceId - a resource IdmessageGenusType - a message genus typefrom - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - resourceId,
messageGenusType, from or to is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesFromSenderForRecipient(Id senderResourceId, Id recipientResourceId) throws OperationFailedException, PermissionDeniedException
MessageList sent by the specified sender and
received by the specified recipient. In plenary mode, the returned
list contains all known messages or an error results. Otherwise, the
returned list may contain only those messages that are accessible
through this session.senderResourceId - a resource IdrecipientResourceId - a resource Id Message listNullArgumentException - senderResourceId
or recipientResourceId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByGenusTypeFromSenderForRecipient(Id senderResourceId, Id recipientResourceId, Type messageGenusType) throws OperationFailedException, PermissionDeniedException
MessageList of the given genus type sent by the
specified sender and received by the specified recipient. In plenary
mode, the returned list contains all known messages or an error
results. Otherwise, the returned list may contain only those messages
that are accessible through this session.senderResourceId - a resource IdrecipientResourceId - a resource IdmessageGenusType - a message genus type Message listNullArgumentException - senderResourceId,
recipientResourceId or messageGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByReceivedTimeFromSenderForRecipient(Id senderResourceId, Id recipientResourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList by the specified sender, recipient,
and received time. In plenary mode, the returned list contains all
known messages or an error results. Otherwise, the returned list may
contain only those messages that are accessible through this session.senderResourceId - a resource IdrecipientResourceId - a resource Idfrom - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - senderResourceId,
recipientResourceId, from or to is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessagesByReceivedTimeAndGenusTypeFromSenderForRecipient(Id senderResourceId, Id recipientResourceId, Type messageGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
MessageList of the given genus type and received
by the specified resource and received time. In plenary mode, the
returned list contains all known messages or an error results.
Otherwise, the returned list may contain only those messages that are
accessible through this session.senderResourceId - a resource IdrecipientResourceId - a resource IdmessageGenusType - a message genus typefrom - starting dateto - ending date Message listInvalidArgumentException - to is less
than from NullArgumentException - senderResourceId,
recipientResourceId, messageGenusType, from or
to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. MessageList getMessages() throws OperationFailedException, PermissionDeniedException
Messages. In plenary mode, the returned list
contains all known messages or an error results. Otherwise, the
returned list may contain only those messages that are accessible
through this session. Messages OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.