Interface ReceiptBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, ReceiptAdminSession
This session updates Receipts in bulk. The data for update is
provided by the consumer via the form object. OsidForms are
requested for each update and may not be reused.
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
.
-
Method Summary
Modifier and TypeMethodDescriptiongetReceiptFormsForUpdate(IdList receiptIds) Gets the receipt forms for updating an existing set of receipts.updateReceipts(ReceiptBatchFormList receiptForms) Updates existing receipts.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.Methods inherited from interface ReceiptAdminSession
canUpdateReceipts, getMailbox, getMailboxId, getReceiptFormForUpdate, updateReceiptModifier and TypeMethodDescriptionbooleanTests if this user can updateReceipts.Gets theMailboxassociated with this session.Gets theMailboxIdassociated with this session.getReceiptFormForUpdate(Id receiptId) Gets the receipt form for updating an existing receipt.voidupdateReceipt(ReceiptForm receiptForm) Updates an existing receipt.
-
Method Details
-
getReceiptFormsForUpdate
ReceiptBatchFormList getReceiptFormsForUpdate(IdList receiptIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the receipt forms for updating an existing set of receipts. A new receipt form should be requested for each update transaction.- Parameters:
receiptIds- theIdsof theReceipts- Returns:
- the receipt form
- Throws:
NotFoundException- areceiptIdis not foundNullArgumentException-receiptIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateReceipts
UpdateResponseList updateReceipts(ReceiptBatchFormList receiptForms) throws OperationFailedException, PermissionDeniedException Updates existing receipts. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
receiptForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-receiptFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-