Interface InquiryBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, InquiryAdminSession, OsidSession, OsidSession
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 .
-
Method Summary
Modifier and TypeMethodDescriptionaliasInquiries(AliasRequestList aliasRequests) Adds anIdto anInquiryfor the purpose of creating compatibility.createInquiries(InquiryBatchFormList inquiryForms) Creates a new set ofInquiries.Deletes allInquiriesin thisInquests.deleteInquiries(IdList inquiryIds) Deletes inquiries for the givenIds.deleteInquiriesForAudit(Id auditId) Deletes inquiries for the given audit.getInquiryFormsForCreate(IdList auditIds, Type[] inquiryRecordTypes) Gets the inquiry forms for creating a bunch of new inquiries.getInquiryFormsForUpdate(IdList inquiryIds) Gets the inquiry forms for updating an existing set of inquiries.updateInquiries(InquiryBatchFormList inquiryForms) Updates existing inquiries.Methods inherited from interface InquiryAdminSession
aliasInquiry, canCreateInquiries, canCreateInquiryWithRecordTypes, canDeleteInquiries, canManageInquiryAliases, canSequenceInquiries, canUpdateInquiries, createInquiry, deleteInquiry, getInquest, getInquestId, getInquiryFormForCreate, getInquiryFormForUpdate, moveInquiryAhead, moveInquiryBehind, orderInquiries, updateInquiryModifier and TypeMethodDescriptionvoidaliasInquiry(Id inquiryId, Id aliasId) Adds anIdto anInquiryfor the purpose of creating compatibility.booleanTests if this user can createInquiries.booleancanCreateInquiryWithRecordTypes(Type[] inquiryRecordTypes) Tests if this user can create a singleInquiryusing the desired record types.booleanTests if this user can deleteInquiries.booleanTests if this user can manageIdaliases forInquiries.booleanTests if this user can orderInquiries.booleanTests if this user can updateInquiries.createInquiry(InquiryForm inquiryForm) Creates a newInquiry.voiddeleteInquiry(Id inquiryId) Deletes anInquiry.Gets theInquestassociated with this session.Gets theInquestIdassociated with this session.getInquiryFormForCreate(Id auditId, Type[] inquiryRecordTypes) Gets the inquiry form for creating new inquiries.getInquiryFormForUpdate(Id inquiryId) Gets the inquiry form for updating an existing inquiry.voidmoveInquiryAhead(Id inquiryId, Id auditId, Id referenceId) Reorders inquiries in an audit by moving the specified inquiry in front of a reference inquiry.voidmoveInquiryBehind(Id inquiryId, Id auditId, Id referenceId) Reorders inquiries in an audit by moving the specified inquiry behind a reference inquiry.voidorderInquiries(Id[] inquiryIds, Id auditId) Reorders a set of inquiries in an audit.voidupdateInquiry(InquiryForm inquiryForm) Updates an existing inquiry.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.
-
Method Details
-
getInquiryFormsForCreate
InquiryBatchFormList getInquiryFormsForCreate(IdList auditIds, Type[] inquiryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the inquiry forms for creating a bunch of new inquiries. An inquiry form is returned for each audit.- Parameters:
auditIds- a list of auditIdsinquiryRecordTypes- array of inquiry record types to be included in each create operation or an empty list if none- Returns:
- the inquiry forms
- Throws:
NotFoundException- anauditIdis not foundNullArgumentException-auditIdsorinquiryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createInquiries
CreateResponseList createInquiries(InquiryBatchFormList inquiryForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofInquiries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
inquiryForms- the inquiry forms- Returns:
- the create responses
- Throws:
NullArgumentException-inquiryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getInquiryFormsForUpdate
InquiryBatchFormList getInquiryFormsForUpdate(IdList inquiryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the inquiry forms for updating an existing set of inquiries. A new inquiry form should be requested for each update transaction.- Parameters:
inquiryIds- theIdsof theInquiries- Returns:
- the inquiry forms
- Throws:
NotFoundException- aninquiryIdis not foundNullArgumentException-inquiryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateInquiries
UpdateResponseList updateInquiries(InquiryBatchFormList inquiryForms) throws OperationFailedException, PermissionDeniedException Updates existing inquiries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
inquiryForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-inquiryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllInquiries
Deletes allInquiriesin thisInquests.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteInquiries
DeleteResponseList deleteInquiries(IdList inquiryIds) throws OperationFailedException, PermissionDeniedException Deletes inquiries for the givenIds.- Parameters:
inquiryIds- theIdsof the inquiries to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-inquiryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteInquiriesForAudit
DeleteResponseList deleteInquiriesForAudit(Id auditId) throws OperationFailedException, PermissionDeniedException Deletes inquiries for the given audit.- Parameters:
auditId- theIdof an audit- Returns:
- the delete responses
- Throws:
NullArgumentException-auditIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasInquiries
AliasResponseList aliasInquiries(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anInquiryfor the purpose of creating compatibility. The primaryIdof theInquiryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another inquiry, it is reassigned to the given inquiryId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-