public interface AssessmentEntryAdminSession extends OsidSession
This session creates, updates, and deletes AssessmentEntries.
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
AssessmentEntry, an AssessmentEntryForm is
requested using getAssessmentEntryFormForCreate()
specifying the desired award, student, and record Types or
none if no record Types are needed. The returned
AssessmentEntryForm 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 AssessmentEntryForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each AssessmentEntryForm
corresponds to an attempted transaction.
For updates, AssessmentEntryForms are requested to the
AssessmentEntry Id that is to be updated
using getAssessmentEntryFormForUpdate(). Similarly, the
AssessmentEntryForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
AssessmentEntryForm can only be used once for a successful
update and cannot be reused.
The delete operations delete AssessmentEntries. To
unmap an AssessmentEntry from the current
CourseCatalog, the
AssessmentEntryCourseCatalogAssignmentSession should be used.
These delete operations attempt to remove the AssessmentEntryForm
itself thus removing it from all known CourseCatalog
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 |
aliasAssessmentEntry(Id assessmentEntryId,
Id aliasId)
Adds an
Id to an AssessmentEntry for the
purpose of creating compatibility. |
boolean |
canCreateAssessmentEntries()
Tests if this user can create
AssessmentEntries. |
boolean |
canCreateAssessmentEntryWithRecordTypes(Type[] assessmentEntryRecordTypes)
Tests if this user can create a single
Porgram using
the desired record types. |
boolean |
canDeleteAssessmentEntries()
Tests if this user can delete
AssessmentEntries. |
boolean |
canDeleteAssessmentEntry(Id assessmentEntryId)
Tests if this user can delete a specified
AssessmentEntry. |
boolean |
canManageAssessmentEntryAliases()
Tests if this user can manage
Id aliases for
AssessmentEntries. |
boolean |
canUpdateAssessmentEntries()
Tests if this user can update
AssessmentEntries. |
AssessmentEntry |
createAssessmentEntry(AssessmentEntryForm assessmentEntryForm)
Creates a new
AssessmentEntry. |
void |
deleteAssessmentEntry(Id assessmentEntryId)
Deletes an
AssessmentEntry. |
AssessmentEntryForm |
getAssessmentEntryFormForCreate(Id assessmentId,
Id resourceId,
Type[] assessmentEntryRecordTypes)
Gets the assessment entry form for creating new assessment entries.
|
AssessmentEntryForm |
getAssessmentEntryFormForUpdate(Id assessmentEntryId)
Gets the assessment entry form for updating an existing assessment
entry.
|
CourseCatalog |
getCourseCatalog()
Gets the
CourseCatalog associated with this session. |
Id |
getCourseCatalogId()
Gets the
CourseCatalog Id associated
with this session. |
void |
updateAssessmentEntry(AssessmentEntryForm assessmentEntryForm)
Updates an existing assessment entry.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getCourseCatalogId()
CourseCatalog Id associated
with this session. CourseCatalog Id associated with this
sessionmandatory - This method must be implemented. CourseCatalog getCourseCatalog() throws OperationFailedException, PermissionDeniedException
CourseCatalog associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateAssessmentEntries()
AssessmentEntries. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known creating an AssessmentEntry
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 AssessmentEntry
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateAssessmentEntryWithRecordTypes(Type[] assessmentEntryRecordTypes)
Porgram using
the desired record types. While
CourseChronicleManager.getAssessmentEntryRecordTypes() can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific AssessmentEntry.
Providing an empty array tests if an AssessmentEntry
can be created with no records.assessmentEntryRecordTypes - array of assessment entry record
types true if AssessmentEntry creation
using the specified record Types is supported,
false otherwiseNullArgumentException -
assessmentEntryRecordTypes is null mandatory - This method must be implemented. AssessmentEntryForm getAssessmentEntryFormForCreate(Id assessmentId, Id resourceId, Type[] assessmentEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentId - an assessment Id resourceId - a student Id assessmentEntryRecordTypes - array of assessment entry record
typesNotFoundException - assessmentId or
resourceId is not foundNullArgumentException - assessmentId,
resourceId, or assessmentEntryRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. AssessmentEntry createAssessmentEntry(AssessmentEntryForm assessmentEntryForm) throws OperationFailedException, PermissionDeniedException
AssessmentEntry. assessmentEntryForm - the form for this AssessmentEntry
AssessmentEntry IllegalStateException - assessmentEntryForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - assessmentEntryForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - assessmentEntryForm
did not originate from
getAssessmentEntryFormForCreate() mandatory - This method must be implemented. boolean canUpdateAssessmentEntries()
AssessmentEntries. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known updating an AssessmentEntry
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 AssessmentEntry
modification is not authorized, true otherwisemandatory - This method must be implemented. AssessmentEntryForm getAssessmentEntryFormForUpdate(Id assessmentEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentEntryId - the Id of the
AssessmentEntry NotFoundException - assessmentEntryId is
not foundNullArgumentException - assessmentEntryId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateAssessmentEntry(AssessmentEntryForm assessmentEntryForm) throws OperationFailedException, PermissionDeniedException
assessmentEntryForm - the form containing the elements to be
updatedIllegalStateException - assessmentEntryForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - assessmentEntryForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - assessmentEntryForm
did not originate from
getAssessmentEntryFormForUpdate() mandatory - This method must be implemented. boolean canDeleteAssessmentEntries()
AssessmentEntries. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known deleting an AssessmentEntry
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 AssessmentEntry
deletion is not authorized, true otherwisemandatory - This method must be implemented. boolean canDeleteAssessmentEntry(Id assessmentEntryId)
AssessmentEntry.
A return of true does not guarantee successful authorization.
A return of false indicates that it is known deleting the
AssessmentEntry will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer a delete operation to an unauthorized user for this
assessment entry.assessmentEntryId - the Id of the
AssessmentEntry false if deletion of this
AssessmentEntry is not authorized, true
otherwiseNullArgumentException - assessmentEntryId
is null mandatory - This method must be implemented. If - the assessmentEntryId is not found, then it
is acceptable to return false to indicate the lack of a delete
available. void deleteAssessmentEntry(Id assessmentEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AssessmentEntry. assessmentEntryId - the Id of the
AssessmentEntry to removeNotFoundException - assessmentEntryId
not foundNullArgumentException - assessmentEntryId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageAssessmentEntryAliases()
Id aliases for
AssessmentEntries. 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 AssessmentEntry
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasAssessmentEntry(Id assessmentEntryId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an AssessmentEntry for the
purpose of creating compatibility. The primary Id of
the AssessmentEntry is determined by the provider. The
new Id performs as an alias to the primary Id.
If the alias is a pointer to another assessment entry, it is
reassigned to the given assessment entry Id. assessmentEntryId - the Id of an
AssessmentEntry aliasId - the alias Id AlreadyExistsException - aliasId is in
use as a primary Id NotFoundException - assessmentEntryId
not foundNullArgumentException - assessmentEntryId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.