OSID Logo
OSID Specifications
messaging package
Version 3.0.0
Release Candidate Preview
Interfaceosid.messaging.MessageLookupSession
Implementsosid.OsidSession
Description

This session defines methods for retrieving messages.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • isolated mailbox view: All message methods in this session operate, retrieve and pertain to messages defined explicitly in the current mailbox. Using an isolated view is useful for managing Messages with the MessageAdminSession.
  • federated mailbox view: All message methods in this session operate, retrieve and pertain to all messages defined in this mailbox and any other messages implicitly available in this mailbox through mailbox inheritence.

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.

MethodgetMailboxId
Description

Gets the Mailbox Id associated with this session.

Returnosid.id.Idthe Mailbox Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetMailbox
Description

Gets the Mailbox associated with this session.

Returnosid.messaging.Mailboxthe Mailbox associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupMessages
Description

Tests if this user can perform 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.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeMessageView
Description

The returns from the lookup 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.
MethodusePlenaryMessageView
Description

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

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedMailboxView
Description

Federates the view for methods in this session. A federated view will include messages in mailboxes which are children of this mailbox in the mailbox hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedMailboxView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this mailbox only.

CompliancemandatoryThis method is must be implemented.
MethodgetMessage
Description

Gets the 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.

Parametersosid.id.IdmessageIdthe Id of the Message to retrieve
Returnosid.messaging.Messagethe returned Message
ErrorsNOT_FOUNDno Message found with the given Id
NULL_ARGUMENT messageId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByIds
Description

Gets a 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.

Parametersosid.id.IdListmessageIdsthe list of Ids to retrieve
Returnosid.messaging.MessageListthe returned Message list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT messageIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByGenusType
Description

Gets a 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.

Parametersosid.type.TypemessageGenusTypea message genus type
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT messageGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByParentGenusType
Description

Gets a 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 session

Parametersosid.type.TypemessageGenusTypea message genus type
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT messageGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByRecordType
Description

Gets a 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.

Parametersosid.type.TypemessageRecordTypea message record type
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT messageRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesBySentTime
Description

Gets a 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.

Parametersosid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesBySentTimeAndGenusType
Description

Gets a 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.

Parametersosid.type.TypemessageGenusTypea message genus type
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT messageGenusType, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesFromSender
Description

Gets a 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.

Parametersosid.id.IdresourceIda resource Id
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByGenusTypeFromSender
Description

Gets a 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.

Parametersosid.id.IdresourceIda resource Id
osid.type.TypemessageGenusTypea message genus type
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT resourceId or messageGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesBySentTimeFromSender
Description

Gets a 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 session

Parametersosid.id.IdresourceIda resource Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesBySentTimeAndGenusTypeFromSender
Description

Gets a 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.

Parametersosid.id.IdresourceIda resource Id
osid.type.TypemessageGenusTypea message genus type
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, messageGenusType, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesForRecipient
Description

Gets a 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.

Parametersosid.id.IdresourceIda resource Id
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByGenusTypeForRecipient
Description

Gets a 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.

Parametersosid.id.IdresourceIda resource Id
osid.type.TypemessageGenusTypea message genus type
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT resourceId or messageGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByReceivedTimeForRecipient
Description

Gets a 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.

Parametersosid.id.IdresourceIda resource Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByReceivedTimeAndGenusTypeForRecipient
Description

Gets a 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.

Parametersosid.id.IdresourceIda resource Id
osid.type.TypemessageGenusTypea message genus type
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, messageGenusType, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesFromSenderForRecipient
Description

Gets a 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.

Parametersosid.id.IdsenderResourceIda resource Id
osid.id.IdrecipientResourceIda resource Id
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT senderResourceId or recipientResourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByGenusTypeFromSenderForRecipient
Description

Gets a 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.

Parametersosid.id.IdsenderResourceIda resource Id
osid.id.IdrecipientResourceIda resource Id
osid.type.TypemessageGenusTypea message genus type
Returnosid.messaging.MessageListthe returned Message list
ErrorsNULL_ARGUMENT senderResourceId, recipientResourceId or messageGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByReceivedTimeFromSenderForRecipient
Description

Gets a 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.

Parametersosid.id.IdsenderResourceIda resource Id
osid.id.IdrecipientResourceIda resource Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT senderResourceId, recipientResourceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByReceivedTimeAndGenusTypeFromSenderForRecipient
Description

Gets a 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.

Parametersosid.id.IdsenderResourceIda resource Id
osid.id.IdrecipientResourceIda resource Id
osid.type.TypemessageGenusTypea message genus type
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.messaging.MessageListthe returned Message list
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT senderResourceId, recipientResourceId, messageGenusType, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetMessages
Description

Gets all 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.

Returnosid.messaging.MessageLista list of Messages
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.