OSID Logo
OSID Specifications
inquiry batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inquiry.batch.InquiryBatchAdminSession
Implementsosid.inquiry.InquiryAdminSession
Description

This session creates, updates, and deletes Inquiries 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 an Inquiry, an InquiryForm is requested using getInquiryFormsForCreate() specifying the desired queues, resources, and record Types or none if no record Types are needed. Each of the returned InquiryForms 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 an InquiryForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each InquiryForm corresponds to an attempted transaction.

The InquiryForms returned from getInquiryFormsForCreate() may be linked to the originating request through the peer Ids of the InquiryForm. In the case where there may be duplicates, any InquiryForm of the same peer Ids may be used for a create operation.

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

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

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

The delete operations delete Inquiries in bulk. To unmap an Inquiry from the current Inquest, the InquiryInquestAssignmentSession should be used. These delete operations attempt to remove the Inquiry itself thus removing it from all known Inquest catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetInquiryFormsForCreate
Description

Gets the inquiry forms for creating a bunch of new inquiries. An inquiry form is returned for each audit.

Parametersosid.id.IdListauditIdsa list of audit Ids
osid.type.Type[]inquiryRecordTypesarray of inquiry record types to be included in each create operation or an empty list if none
Returnosid.inquiry.batch.InquiryBatchFormListthe inquiry forms
ErrorsNOT_FOUNDan auditId is not found
NULL_ARGUMENT auditIds or inquiryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateInquiries
Description

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

Parametersosid.inquiry.batch.InquiryBatchFormListinquiryFormsthe inquiry forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT inquiryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInquiryFormsForUpdate
Description

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

Parametersosid.id.IdListinquiryIdsthe Ids of the Inquiries
Returnosid.inquiry.batch.InquiryBatchFormListthe inquiry forms
ErrorsNOT_FOUNDan inquiryId is not found
NULL_ARGUMENT inquiryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateInquiries
Description

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

Parametersosid.inquiry.batch.InquiryBatchFormListinquiryFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT inquiryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllInquiries
Description

Deletes all Inquiries in this Inquests.

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteInquiries
Description

Deletes inquiries for the given Ids.

Parametersosid.id.IdListinquiryIdsthe Ids of the inquiries to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT inquiryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteInquiriesForAudit
Description

Deletes inquiries for the given audit.

Parametersosid.id.IdauditIdthe Id of an audit
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT auditId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasInquiries
Description

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

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.