public interface ChecklistAdminSession extends OsidSession
This session creates, updates, and deletes Checklists.
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 a
Checklist, a ChecklistForm is requested using
geChecklistFormForCreate() specifying the desired record
Types or none if no record Types are needed.
The returned ChecklistForm 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 ChecklistForm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
ChecklistForm corresponds to an attempted transaction.
For updates, ChecklistForms are requested to the
Checklist Id that is to be updated using
getChecklistFormForUpdate(). Similarly, the ChecklistForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The ChecklistForm
can only be used once for a successful update and cannot be reused.
The delete operations delete Checklists.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasChecklist(Id checklistId,
Id aliasId)
Adds an
Id to a Checklist for the
purpose of creating compatibility. |
boolean |
canCreateChecklists()
Tests if this user can create
Checklists. |
boolean |
canCreateChecklistWithRecordTypes(Type[] checklistRecordTypes)
Tests if this user can create a single
Checklist using
the desired record types. |
boolean |
canDeleteChecklists()
Tests if this user can delete
Checklists A return of
true does not guarantee successful authorization. |
boolean |
canManageChecklistAliases()
Tests if this user can manage
Id aliases for
Checklists. |
boolean |
canUpdateChecklists()
Tests if this user can update
Checklists. |
Checklist |
createChecklist(ChecklistForm checklistForm)
Creates a new
Checklist. |
void |
deleteChecklist(Id checklistId)
Deletes a
Checklist. |
ChecklistForm |
getChecklistFormForCreate(Type[] checklistRecordTypes)
Gets the checklist form for creating new checklists.
|
ChecklistForm |
getChecklistFormForUpdate(Id checklistId)
Gets the checklist form for updating an existing checklist.
|
void |
updateChecklist(ChecklistForm checklistForm)
Updates an existing checklist.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canCreateChecklists()
Checklists. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a Checklist 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 Checklist creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateChecklistWithRecordTypes(Type[] checklistRecordTypes)
Checklist using
the desired record types. While
ChecklistManager.getChecklistRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Checklist.
Providing an empty array tests if a Checklist can be
created with no records.checklistRecordTypes - array of checklist record types true if Checklist creation using
the specified record Types is supported,
false otherwiseNullArgumentException - checklistRecordTypes
is null mandatory - This method must be implemented. ChecklistForm getChecklistFormForCreate(Type[] checklistRecordTypes) throws OperationFailedException, PermissionDeniedException
checklistRecordTypes - array of checklist record typesNullArgumentException - checklistRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Checklist createChecklist(ChecklistForm checklistForm) throws OperationFailedException, PermissionDeniedException
Checklist. checklistForm - the form for this Checklist Checklist IllegalStateException - checklistForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - checklistForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - checklistForm did
not originate from getChecklistFormForCreate() mandatory - This method must be implemented. boolean canUpdateChecklists()
Checklists. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a Checklist 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 Checklist modification
is not authorized, true otherwisemandatory - This method must be implemented. ChecklistForm getChecklistFormForUpdate(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
checklistId - the Id of the Checklist
NotFoundException - checklistId is not
foundNullArgumentException - checklistId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateChecklist(ChecklistForm checklistForm) throws OperationFailedException, PermissionDeniedException
checklistForm - the form containing the elements to be updatedIllegalStateException - checklistForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - checklistForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - checklistForm did
not originate from getChecklistFormForUpdate() mandatory - This method must be implemented. boolean canDeleteChecklists()
Checklists A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a Checklist 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 Checklist deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteChecklist(Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Checklist. checklistId - the Id of the Checklist
to removeNotFoundException - checklistId not
foundNullArgumentException - checklistId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageChecklistAliases()
Id aliases for
Checklists. 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 Checklist aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasChecklist(Id checklistId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Checklist for the
purpose of creating compatibility. The primary Id of
the Checklist is determined by the provider. The new
Id performs as an alias to the primary Id.
If the alias is a pointer to another checklist, it is
reassigned to the given checklist Id. checklistId - the Id of a Checklist
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - checklistId not
foundNullArgumentException - checklistId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.