OSID Logo
OSID Specifications
messaging package
Version 3.0.0
Release Candidate Preview
Interfaceosid.messaging.MessageSearchSession
Implementsosid.messaging.MessageQuerySession
Description

This session provides methods for searching among Message objects. The search query is constructed using the MessageQuery.

getMessagesByQuery() is the basic search method and returns a list of Messages. A more advanced search may be performed with getMessagesBySearch(). It accepts an MessageSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getMessagesBySearch() returns an MessageSearchResults that can be used to access the resulting MessageList or be used to perform a search within the result set through MessageList.

This session defines views that offer differing behaviors for searching.

  • federated mailbox view: searches include messages in mailboxes of which this mailbox is a ancestor in the mailbox hierarchy
  • isolated mailbox view: searches are restricted to messages in this mailbox

Messages may have a query record indicated by their respective record types. The query record is accessed via the MessageQuery.

MethodgetMessageSearch
Description

Gets a message search.

Returnosid.messaging.MessageSearchthe message search
CompliancemandatoryThis method must be implemented.
MethodgetMessageSearchOrder
Description

Gets a message search order. The MessageSearchOrder is supplied to a MessageSearch to specify the ordering of results.

Returnosid.messaging.MessageSearchOrderthe message search order
CompliancemandatoryThis method must be implemented.
MethodgetMessagesBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.messaging.MessageQuerymessageQuerythe message query
osid.messaging.MessageSearchmessageSearchthe message search
Returnosid.messaging.MessageSearchResultsthe returned search results
ErrorsNULL_ARGUMENT messageQuery or messageSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED messageQuery or messageSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetMessageQueryFromInspector
Description

Gets a message query from an inspector. The inspector is available from a MessageSearchResults.

Parametersosid.messaging.MessageQueryInspectormessageQueryInspectora message query inspector
Returnosid.messaging.MessageQuerythe message query
ErrorsNULL_ARGUMENT messageQueryInspector is null
UNSUPPORTED messageQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.