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

This session creates, updates, and deletes Inquiries. 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 getInquiryFormForCreate() specifying the desired audit and record Types or none if no record Types are needed. The returned InquiryForm 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 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.

For updates, InquiryForms are requested to the Inquiry Id that is to be updated using getInquiryFormForUpdate(). 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.

The delete operations delete Inquiries. 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.

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

MethodgetInquestId
Description

Gets the Inquest Id associated with this session.

Returnosid.id.Idthe Inquest Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetInquest
Description

Gets the Inquest associated with this session.

Returnosid.inquiry.Inquestthe inquest
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateInquiries
Description

Tests if this user can create Inquiries. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Inquiry 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 Inquiry creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateInquiryWithRecordTypes
Description

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

Parametersosid.type.Type[]inquiryRecordTypesarray of inquiry record types
Returnboolean true if Inquiry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT inquiryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetInquiryFormForCreate
Description

Gets the inquiry form for creating new inquiries. A new form should be requested for each create transaction.

Parametersosid.id.IdauditIdthe Id for the audit
osid.type.Type[]inquiryRecordTypesarray of inquiry record types
Returnosid.inquiry.InquiryFormthe inquiry form
ErrorsNOT_FOUND auditId is not found
NULL_ARGUMENT auditId or inquiryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateInquiry
Description

Creates a new Inquiry.

Parametersosid.inquiry.InquiryForminquiryFormthe form for this Inquiry
Returnosid.inquiry.Inquirythe new Inquiry
ErrorsILLEGAL_STATE inquiryForm already used in a create transaction.
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT inquiryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED inquiryForm did not originate from getInquiryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateInquiries
Description

Tests if this user can update Inquiries. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Inquiry 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 Inquiry modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetInquiryFormForUpdate
Description

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

Parametersosid.id.IdinquiryIdthe Id of the Inquiry
Returnosid.inquiry.InquiryFormthe inquiry form
ErrorsNOT_FOUND inquiryId is not found
NULL_ARGUMENT inquiryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateInquiry
Description

Updates an existing inquiry.

Parametersosid.inquiry.InquiryForminquiryFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE inquiryForm already used in an update transatcion
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT inquiryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED inquiryForm did not originate from getInquiryFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteInquiries
Description

Tests if this user can delete Inquiries. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Inquiry 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 Inquiry deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteInquiry
Description

Deletes an Inquiry.

Parametersosid.id.IdinquiryIdthe Id of the Inquiry to remove
ErrorsNOT_FOUND inquiryId not found
NULL_ARGUMENT inquiryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageInquiryAliases
Description

Tests if this user can manage Id aliases for Inquiries. 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 Inquiry aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasInquiry
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 performs as an alias to the primary Id. If the alias is a pointer to another inquiry, it is reassigned to the given inquiry Id.

Parametersosid.id.IdinquiryIdthe Id of an Inquiry
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND inquiryId not found
NULL_ARGUMENT inquiryId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanSequenceInquiries
Description

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

Returnboolean false if Inquiry ordering is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodmoveInquiryAhead
Description

Reorders inquiries in an audit by moving the specified inquiry in front of a reference inquiry.

Parametersosid.id.IdinquiryIdthe Id of an Inquiry
osid.id.IdauditIdthe Id of an Audit
osid.id.IdreferenceIdthe reference inquiry Id
ErrorsNOT_FOUND inquiryId, auditId, or referenceId not found or, inquiryId or referenceId not related to auditId
NULL_ARGUMENT inquiryId, auditId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodmoveInquiryBehind
Description

Reorders inquiries in an audit by moving the specified inquiry behind a reference inquiry.

Parametersosid.id.IdinquiryIdthe Id of an Inquiry
osid.id.IdauditIdthe Id of an Audit
osid.id.IdreferenceIdthe reference inquiry Id
ErrorsNOT_FOUND inquiryId, auditId, or referenceId not found or, inquiryId or referenceId not related to auditId
NULL_ARGUMENT inquiryId, auditId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodorderInquiries
Description

Reorders a set of inquiries in an audit.

Parametersosid.id.Id[]inquiryIdsthe Ids for a set of Inquiries
osid.id.IdauditIdthe Id of an Audit
ErrorsNOT_FOUND auditId not found or, an inquiryId not related to auditId
NULL_ARGUMENT inquiryIds or auditId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.