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

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

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.

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.
MethodcanSearchMessages
Description

Tests if this user can perform Message searches. 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 search operations to unauthorized users.

Returnboolean false if search methods are not authorized, true otherwise
CompliancemandatoryThis method 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.
MethodgetMessageQuery
Description

Gets a message query. The returned query will not have an extension query.

Returnosid.messaging.MessageQuerythe message query
CompliancemandatoryThis method must be implemented.
MethodgetMessagesByQuery
Description

Gets a list of Messages matching the given message query.

Parametersosid.messaging.MessageQuerymessageQuerythe message query
Returnosid.messaging.MessageListthe returned MessageList
ErrorsNULL_ARGUMENT messageQuery is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED messageQuery is not of this service
CompliancemandatoryThis method must be implemented.