OSID Logo
OSID Specifications
messaging batch package
Version 3.1.0
Interfaceosid.messaging.batch.ReceiptBatchAdminSession
Implementsosid.messaging.ReceiptAdminSession
Used Byosid.messaging.batch.MessagingBatchManager
osid.messaging.batch.MessagingBatchProxyManager
Description

This session creates, updates, and deletes Receipts in bulk. 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 Receipt, a ReceiptForm is requested using getReceiptFormsForCreate() specifying the desired Messages and record Types or none if no record Types are needed. Each of the returned ReceiptForms will indicate that it is to be used with a create operation and can be used to examine metadata or validate data prior to creation. Once a ReceiptForm is submitted to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ReceiptForm corresponds to an attempted transaction.

The ReceiptForms returned from getReceiptFormsForCreate() may be linked to the originating request through the Message Id of the ReceiptForm. In the case where there may be duplicates, any ReceiptForm of the same Message Id may be used for a create operation.

Once a batch of ReceiptForms are submitted for create, a CreateResponse is returned for each ReceiptForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createReceipts(), errors specific to an individual ReceiptForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating ReceiptForm through the ReceiptForm Id.

For updates, ReceiptForms are requested to the Receipt Id that is to be updated using getReceiptFormsForUpdate() where the reference Id in the ReceiptForm may be used to link the request. Similarly, the ReceiptForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ReceiptForm can only be used once for a successful update and cannot be reused.

Once a batch of ReceiptForms are submitted for update, an UpdateResponse is returned for each ReceiptForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updateReceipts(), errors specific to an individual ReceiptForm are indicated in the corresponding UpdateResponse. UpdateResponses may be linked to the originating ReceiptForm through the ReceiptForm Id.

The delete operations delete Receipts in bulk. These delete operations attempt to remove the Receipt itself thus removing it from all known Mailbox catalogs. Bulk delete operations return the results in DeleteResponses.

Like all OsidSessions, ReceiptBatchAdminSessions are dedicated to single processing threads and a single authenticated user.

MethodgetReceiptFormsForCreate
Description

Gets the receipt forms for creating a bunch of new receipts. A form is returned for each message.

Parametersosid.id.IdListmessageIds the Ids of the Messages
osid.type.Type[]receiptRecordTypes array of receipt record types to be included in each create operation or an empty list if none
Returnosid.messaging.batch.ReceiptBatchFormList the receipt forms
ErrorsNOT_FOUND a messageId is not found
NULL_ARGUMENT messageIds or receiptRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to request forms with given record types
Compliancemandatory This method must be implemented.
MethodcreateReceipts
Description

Creates a new set of Receipts. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse.

Parametersosid.messaging.batch.ReceiptBatchFormListreceiptForms the receipt forms
Returnosid.transaction.batch.CreateResponseList the create responses
ErrorsNULL_ARGUMENT receiptForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetReceiptFormsForUpdate
Description

Gets the receipt forms for updating an existing set of receipts. A new receipt form should be requested for each update transaction.

Parametersosid.id.IdListreceiptIds the Ids of the Receipts
Returnosid.messaging.batch.ReceiptBatchFormList the receipt form
ErrorsNOT_FOUND a receiptId is not found
NULL_ARGUMENT receiptIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateReceipts
Description

Updates existing receipts. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse.

Parametersosid.messaging.batch.ReceiptBatchFormListreceiptForms the form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseList the update responses
ErrorsNULL_ARGUMENT receiptForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteAllReceipts
Description

Deletes all Receipts in this Mailbox.

Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteReceiptsForMessage
Description

Deletes receipts for the given message.

Parametersosid.id.IdmessageId the Id of a Message
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT messageId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteReceiptsForRecipient
Description

Deletes receipts for the given recipient resource.

Parametersosid.id.IdresourceId the Id of a resource
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteReceiptsByDate
Description

Deletes receipts received between the given date range inclusive.

Parametersosid.calendaring.DateTimefrom start of date range
osid.calendaring.DateTimeto end of date range
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT from or to is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodaliasReceipts
Description

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

Parametersosid.transaction.batch.AliasRequestListaliasRequests the alias requests
Returnosid.transaction.batch.AliasResponseList the alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.