OSID Logo
OSID Specifications
messaging package
Version 3.1.0
Interfaceosid.messaging.MessageAdminSession
Implementsosid.OsidSession
Implemented Byosid.messaging.batch.MessageBatchAdminSession
Used Byosid.messaging.MessagingManager
osid.messaging.MessagingProxyManager
Description

This session creates, updates, and deletes Messages. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Message, a MessageForm is requested using getMessageFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned MessageForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the MessageForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each MessageForm corresponds to an attempted transaction.

For updates, MessageForms are requested to the Message Id that is to be updated using getMessageFormForUpdate(). Similarly, the MessageForm has metadata about the data that can be updated and it can perform validation before submitting the update. The MessageForm can only be used once for a successful update and cannot be reused.

The delete operations delete Messages. To unmap a Message from the current Mailbox, the MessageMailboxAssignmentSession should be used. These delete operations attempt to remove the Message itself thus removing it from all known Mailbox catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetMailboxId
Description

Gets the Mailbox Id associated with this session.

Returnosid.id.Id the Mailbox Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetMailbox
Description

Gets the Mailbox associated with this session.

Returnosid.messaging.Mailbox the Mailbox associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateMessages
Description

Tests if this user can create Messages. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Message will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Message creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateMessageWithRecordTypes
Description

Tests if this user can create a single Message using the desired record types. While MessagingManager.getMessageRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Message. Providing an empty array tests if a Message can be created with no records.

Parametersosid.type.Type[]messageRecordTypes array of message record types
Returnboolean true if Message creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT messageRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetMessageFormForCreate
Description

Gets the message form for creating new messages. A new form should be requested for each create transaction.

Parametersosid.type.Type[]messageRecordTypes array of message record types
Returnosid.messaging.MessageForm the message form
ErrorsNULL_ARGUMENT messageRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateMessage
Description

Creates a new Message.

Parametersosid.messaging.MessageFormmessageForm the form for this Message
Returnosid.messaging.Message the new Message
ErrorsILLEGAL_STATE messageForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT messageForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED messageForm did not originate from getMessageFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateMessages
Description

Tests if this user can update Messages. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Message will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Message modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetMessageFormForUpdate
Description

Gets the message form for updating an existing message. A new message form should be requested for each update transaction.

Parametersosid.id.IdmessageId the Id of the Message
Returnosid.messaging.MessageForm the message form
ErrorsNOT_FOUND messageId is not found
NULL_ARGUMENT messageId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateMessage
Description

Updates an existing message.

Parametersosid.messaging.MessageFormmessageForm the form containing the elements to be updated
ErrorsILLEGAL_STATE messageForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT messageForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED messageForm did not originate from getMessageFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteMessages
Description

Tests if this user can delete Messages. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Message will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Message deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteMessage
Description

Deletes a Message.

Parametersosid.id.IdmessageId the Id of the Message to remove
ErrorsNOT_FOUND messageId not found
NULL_ARGUMENT messageId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageMessageAliases
Description

Tests if this user can manage Id aliases for Messages. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Message aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasMessage
Description

Adds an Id to a Message for the purpose of creating compatibility. The primary Id of the Message is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another message, it is reassigned to the given message Id.

Parametersosid.id.IdmessageId the Id of a Message
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND messageId not found
NULL_ARGUMENT aliasId or messageId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.