public interface InquestAdminSession extends OsidSession
This session creates, updates, and deletes Inquests. 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
Inquest, an InquestForm is requested using
getInquestFormForCreate() specifying the desired record
Types or none if no record Types are needed.
The returned InquestForm 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 InquestForm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
InquestForm corresponds to an attempted transaction.
For updates, InquestForms are requested to the
Inquest Id that is to be updated using
getInquestFormForUpdate(). Similarly, the InquestForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The InquestForm
can only be used once for a successful update and cannot be reused.
The delete operations delete Inquests.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasInquest(Id inquestId,
Id aliasId)
Adds an
Id to an Inquest for the purpose
of creating compatibility. |
boolean |
canCreateInquests()
Tests if this user can create
Inquests. |
boolean |
canCreateInquestWithRecordTypes(Type[] inquestRecordTypes)
Tests if this user can create a single
Inquest using
the desired record types. |
boolean |
canDeleteInquests()
Tests if this user can delete
Inquests. |
boolean |
canManageInquestAliases()
Tests if this user can manage
Id aliases for
Inquests. |
boolean |
canUpdateInquests()
Tests if this user can update
Inquests. |
Inquest |
createInquest(InquestForm inquestForm)
Creates a new
Inquest. |
void |
deleteInquest(Id inquestId)
Deletes an
Inquest. |
InquestForm |
getInquestFormForCreate(Type[] inquestRecordTypes)
Gets the inquest form for creating new inquests.
|
InquestForm |
getInquestFormForUpdate(Id inquestId)
Gets the inquest form for updating an existing inquest.
|
void |
updateInquest(InquestForm inquestForm)
Updates an existing inquest
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canCreateInquests()
Inquests. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating an Inquest. will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer create operations to
unauthorized users. false if Inquest creation is not
authorized, true otherwisemandatory - This method must be implemented. boolean canCreateInquestWithRecordTypes(Type[] inquestRecordTypes)
Inquest using
the desired record types. While
ControlManager.getInquestRecordTypes() can be used to examine
which records are supported, this method tests which record(s) are
required for creating a specific Inquest. Providing an
empty array tests if an Inquest can be created with no
records.inquestRecordTypes - array of inquest record types true if Inquest creation using
the specified record Types is supported,
false otherwiseNullArgumentException - inquestRecordTypes
is null mandatory - This method must be implemented. InquestForm getInquestFormForCreate(Type[] inquestRecordTypes) throws OperationFailedException, PermissionDeniedException
inquestRecordTypes - array of inquest record typesNullArgumentException - inquestRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Inquest createInquest(InquestForm inquestForm) throws OperationFailedException, PermissionDeniedException
Inquest. inquestForm - the form for this Inquest Inquest IllegalStateException - inquestForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - inquestForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - inquestForm did
not originate from getInquestFormForCreate() mandatory - This method must be implemented. boolean canUpdateInquests()
Inquests. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating an Inquest will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer update operations to
unauthorized users. false if Inquest modification is
not authorized, true otherwisemandatory - This method must be implemented. InquestForm getInquestFormForUpdate(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
inquestId - the Id of the Inquest NotFoundException - inquestId is not
foundNullArgumentException - inquestId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateInquest(InquestForm inquestForm) throws OperationFailedException, PermissionDeniedException
inquestForm - the form containing the elements to be updatedIllegalStateException - inquestForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - inquestForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - inquestForm did
not originate from getInquestFormForUpdate() mandatory - This method must be implemented. boolean canDeleteInquests()
Inquests. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting an Inquest will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer delete operations to
unauthorized users. false if Inquest deletion is not
authorized, true otherwisemandatory - This method must be implemented. void deleteInquest(Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Inquest. inquestId - the Id of the Inquest
to removeNotFoundException - inquestId not foundNullArgumentException - inquestId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageInquestAliases()
Id aliases for
Inquests. 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 Inquest aliasing is not
authorized, true otherwisemandatory - This method must be implemented. void aliasInquest(Id inquestId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an Inquest for the purpose
of creating compatibility. The primary Id of the
Inquest is determined by the provider. The new Id
performs as an alias to the primary Id. inquestId - the Id of an Inquest aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - inquestId not foundNullArgumentException - inquestId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.