public interface InquiryAdminSession extends OsidSession
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.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasInquiry(Id inquiryId,
Id aliasId)
Adds an
Id to an Inquiry for the purpose
of creating compatibility. |
boolean |
canCreateInquiries()
Tests if this user can create
Inquiries. |
boolean |
canCreateInquiryWithRecordTypes(Type[] inquiryRecordTypes)
Tests if this user can create a single
Inquiry using
the desired record types. |
boolean |
canDeleteInquiries()
Tests if this user can delete
Inquiries. |
boolean |
canManageInquiryAliases()
Tests if this user can manage
Id aliases for
Inquiries. |
boolean |
canSequenceInquiries()
Tests if this user can order
Inquiries. |
boolean |
canUpdateInquiries()
Tests if this user can update
Inquiries. |
Inquiry |
createInquiry(InquiryForm inquiryForm)
Creates a new
Inquiry. |
void |
deleteInquiry(Id inquiryId)
Deletes an
Inquiry. |
Inquest |
getInquest()
Gets the
Inquest associated with this session. |
Id |
getInquestId()
Gets the
Inquest Id associated with this
session. |
InquiryForm |
getInquiryFormForCreate(Id auditId,
Type[] inquiryRecordTypes)
Gets the inquiry form for creating new inquiries.
|
InquiryForm |
getInquiryFormForUpdate(Id inquiryId)
Gets the inquiry form for updating an existing inquiry.
|
void |
moveInquiryAhead(Id inquiryId,
Id auditId,
Id referenceId)
Reorders inquiries in an audit by moving the specified inquiry in
front of a reference inquiry.
|
void |
moveInquiryBehind(Id inquiryId,
Id auditId,
Id referenceId)
Reorders inquiries in an audit by moving the specified inquiry behind
a reference inquiry.
|
void |
orderInquiries(Id[] inquiryIds,
Id auditId)
Reorders a set of inquiries in an audit.
|
void |
updateInquiry(InquiryForm inquiryForm)
Updates an existing inquiry.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getInquestId()
Inquest Id associated with this
session. Inquest Id associated with this sessionmandatory - This method must be implemented. Inquest getInquest() throws OperationFailedException, PermissionDeniedException
Inquest associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateInquiries()
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. false if Inquiry creation is not
authorized, true otherwisemandatory - This method must be implemented. boolean canCreateInquiryWithRecordTypes(Type[] inquiryRecordTypes)
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.inquiryRecordTypes - array of inquiry record types true if Inquiry creation using
the specified record Types is supported,
false otherwiseNullArgumentException - inquiryRecordTypes
is null mandatory - This method must be implemented. InquiryForm getInquiryFormForCreate(Id auditId, Type[] inquiryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
auditId - the Id for the auditinquiryRecordTypes - array of inquiry record typesNotFoundException - auditId is not foundNullArgumentException - auditId or
inquiryRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Inquiry createInquiry(InquiryForm inquiryForm) throws OperationFailedException, PermissionDeniedException
Inquiry. inquiryForm - the form for this Inquiry Inquiry IllegalStateException - inquiryForm
already used in a create transaction.InvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - inquiryForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - inquiryForm did
not originate from getInquiryFormForCreate() mandatory - This method must be implemented. boolean canUpdateInquiries()
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. false if Inquiry modification is
not authorized, true otherwisemandatory - This method must be implemented. InquiryForm getInquiryFormForUpdate(Id inquiryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquiryId - the Id of the Inquiry NotFoundException - inquiryId is not
foundNullArgumentException - inquiryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateInquiry(InquiryForm inquiryForm) throws OperationFailedException, PermissionDeniedException
inquiryForm - the form containing the elements to be updatedIllegalStateException - inquiryForm
already used in an update transatcionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - inquiryForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - inquiryForm did
not originate from getInquiryFormForUpdate() mandatory - This method must be implemented. boolean canDeleteInquiries()
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. false if Inquiry deletion is not
authorized, true otherwisemandatory - This method must be implemented. void deleteInquiry(Id inquiryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Inquiry. inquiryId - the Id of the Inquiry
to removeNotFoundException - inquiryId not foundNullArgumentException - inquiryId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageInquiryAliases()
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. false if Inquiry aliasing is not
authorized, true otherwisemandatory - This method must be implemented. void aliasInquiry(Id inquiryId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
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. inquiryId - the Id of an Inquiry aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - inquiryId not foundNullArgumentException - inquiryId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canSequenceInquiries()
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. false if Inquiry ordering is not
authorized, true otherwisemandatory - This method must be implemented. void moveInquiryAhead(Id inquiryId, Id auditId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquiryId - the Id of an Inquiry auditId - the Id of an Audit referenceId - the reference inquiry Id NotFoundException - inquiryId, auditId,
or referenceId not found or, inquiryId
or referenceId not related to
auditId NullArgumentException - inquiryId, auditId,
or referenceId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void moveInquiryBehind(Id inquiryId, Id auditId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquiryId - the Id of an Inquiry auditId - the Id of an Audit referenceId - the reference inquiry Id NotFoundException - inquiryId, auditId,
or referenceId not found or, inquiryId
or referenceId not related to
auditId NullArgumentException - inquiryId, auditId,
or referenceId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void orderInquiries(Id[] inquiryIds, Id auditId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquiryIds - the Ids for a set of
Inquiries auditId - the Id of an Audit NotFoundException - auditId not found
or, an inquiryId not related to auditId
NullArgumentException - inquiryIds or
auditId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.