public interface AssessmentTakenAdminSession extends OsidSession
This session creates, updates, and deletes AssessmentsTaken.
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
AssessmentTaken, an AssessmentTakenForm is
requested using getAssessmentTakenFormForCreate()
specifying the assessment offered and desired record Types
or none if no record Types are needed. The returned
AssessmentTakenForm 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 AssessmentTakenForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each AssessmentTakenForm
corresponds to an attempted transaction.
For updates, AssessmentTakenForms are requested to the
AssessmentTaken Id that is to be updated
using getAssessmentTakenFormForUpdate(). Similarly, the
AssessmentTakenForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
AssessmentTakenForm can only be used once for a successful
update and cannot be reused.
The delete operations delete AssessmentsTaken. To unmap
an AssessmentTakenForm from the current Bank,
the AssessmentTakenFormBankAssignmentSession should
be used. These delete operations attempt to remove the
AssessmentTakenForm itself thus removing it from all known
Bank 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 |
aliasAssessmentTaken(Id assessmentTakenId,
Id aliasId)
Adds an
Id to an AssessmentTaken for the
purpose of creating compatibility. |
boolean |
canCreateAssessmentsTaken()
Tests if this user can create
AssessmentTaken objects. |
boolean |
canCreateAssessmentTakenWithRecordTypes(Type[] assessmentTakenRecordTypes)
Tests if this user can create a single
AssessmentTaken
using the desired record types. |
boolean |
canDeleteAssessmentsTaken()
Tests if this user can delete
AssessmentsTaken. |
boolean |
canManageAssessmentTakenAliases()
Tests if this user can manage
Id aliases for
AssessmentsTaken. |
boolean |
canUpdateAssessmentsTaken()
Tests if this user can update
AssessmentTaken objects. |
AssessmentTaken |
createAssessmentTaken(AssessmentForm assessmentTakenForm)
Creates a new
AssessmentTaken. |
void |
deleteAssessmentTaken(Id assessmentTakenId)
Deletes an
AssessmentTaken. |
AssessmentTakenForm |
getAssessmentTakenFormForCreate(Id assessmentOfferedId,
Type[] assessmentTakenRecordTypes)
Gets the assessment taken form for creating new assessments taken.
|
AssessmentTakenForm |
getAssessmentTakenFormForUpdate(Id assessmentTakenId)
Gets the assessment taken form for updating an existing assessment
taken.
|
Bank |
getBank()
Gets the
Bank associated with this session. |
Id |
getBankId()
Gets the
Bank Id associated with this
session. |
void |
updateAssessmentTaken(AssessmentTakenForm assessmentTakenForm)
Updates an existing assessment taken.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBankId()
Bank Id associated with this
session. Bank Id associated with this sessionmandatory - This method must be implemented. Bank getBank() throws OperationFailedException, PermissionDeniedException
Bank associated with this session. Bank associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean canCreateAssessmentsTaken()
AssessmentTaken objects.
A return of true does not guarantee successful authoriization. A
return of false indicates that it is known creating an
AssessmentTaken 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 AssessmentTaken
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateAssessmentTakenWithRecordTypes(Type[] assessmentTakenRecordTypes)
AssessmentTaken
using the desired record types. While
AssessmentManager.getAssessmentTakenRecordTypes() can be used
to examine which records are supported, this method tests which
record(s) are required for creating a specific AssessmentTaken.
Providing an empty array tests if an AssessmentTaken
can be created with no records.assessmentTakenRecordTypes - array of assessment taken record
types true if AssessmentTaken creation
using the specified record Types is supported,
false otherwiseNullArgumentException -
assessmentTakenRecordTypes is null mandatory - This method must be implemented. AssessmentTakenForm getAssessmentTakenFormForCreate(Id assessmentOfferedId, Type[] assessmentTakenRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentOfferedId - the Id of the related
AssessmentOffered assessmentTakenRecordTypes - array of assessment taken record
types to be included in the create operation or an empty list
if noneNotFoundException - assessmentOfferedId
is not foundNullArgumentException - assessmentOfferedId
or assessmentTakenRecordTypes is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. AssessmentTaken createAssessmentTaken(AssessmentForm assessmentTakenForm) throws OperationFailedException, PermissionDeniedException
AssessmentTaken. assessmentTakenForm - the form for this AssessmentTaken
AssessmentTaken IllegalStateException - assessmentTakenForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - assessmentTakenForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - assessmentOfferedForm
did not originate from
getAssessmentTakenFormForCreate() mandatory - This method must be implemented. boolean canUpdateAssessmentsTaken()
AssessmentTaken objects.
A return of true does not guarantee successful authorization. A return
of false indicates that it is known updating an AssessmentTaken
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 AssessmentTaken
modification is not authorized, true otherwisemandatory - This method must be implemented. AssessmentTakenForm getAssessmentTakenFormForUpdate(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentTakenId - the Id of the
AssessmentTaken NotFoundException - assessmentTakenId is
not foundNullArgumentException - assessmentTakenId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. void updateAssessmentTaken(AssessmentTakenForm assessmentTakenForm) throws OperationFailedException, PermissionDeniedException
assessmentTakenForm - the form containing the elements to be
updatedIllegalStateException - assessmentTakenForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - assessmentTakenForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredUnsupportedException - assessmentOfferedForm
did not originate from
getAssessmentTakenFormForUpdate() mandatory - This method must be implemented. boolean canDeleteAssessmentsTaken()
AssessmentsTaken. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known deleting an AssessmentTaken
will result in a PERMISSION_DENIED. This is
intended as a hint to an application that may opt not to offer a
delete operations to unauthorized users. false if AssessmentTaken
deletion is not authorized, true otherwisemandatory - This method must be implemented. void deleteAssessmentTaken(Id assessmentTakenId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AssessmentTaken. assessmentTakenId - the Id of the
AssessmentTaken to removeNotFoundException - assessmentTakenId
not foundNullArgumentException - assessmentTakenId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented. boolean canManageAssessmentTakenAliases()
Id aliases for
AssessmentsTaken. 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 AssessmentTaken
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasAssessmentTaken(Id assessmentTakenId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an AssessmentTaken for the
purpose of creating compatibility. The primary Id of
the AssessmentTaken is determined by the provider. The
new Id is an alias to the primary Id. If
the alias is a pointer to another assessment taken, it is reassigned
to the given assessment taken Id. assessmentTakenId - the Id of an
AssessmentTaken aliasId - the alias Id AlreadyExistsException - aliasId is in
use as a primary Id NotFoundException - assessmentTakenId
not foundNullArgumentException - assessmentTakenId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failure
occurredmandatory - This method must be implemented.