Interface AssessmentEntryAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
AssessmentEntryBatchAdminSession
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAssessmentEntry(Id assessmentEntryId, Id aliasId) Adds anIdto anAssessmentEntryfor the purpose of creating compatibility.booleanTests if this user can createAssessmentEntries.booleancanCreateAssessmentEntryWithRecordTypes(Type[] assessmentEntryRecordTypes) Tests if this user can create a singlePorgramusing the desired record types.booleanTests if this user can deleteAssessmentEntries.booleancanDeleteAssessmentEntry(Id assessmentEntryId) Tests if this user can delete a specifiedAssessmentEntry.booleanTests if this user can manageIdaliases forAssessmentEntries.booleanTests if this user can updateAssessmentEntries.createAssessmentEntry(AssessmentEntryForm assessmentEntryForm) Creates a newAssessmentEntry.voiddeleteAssessmentEntry(Id assessmentEntryId) Deletes anAssessmentEntry.getAssessmentEntryFormForCreate(Id assessmentId, Id resourceId, Type[] assessmentEntryRecordTypes) Gets the assessment entry form for creating new assessment entries.getAssessmentEntryFormForUpdate(Id assessmentEntryId) Gets the assessment entry form for updating an existing assessment entry.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.voidupdateAssessmentEntry(AssessmentEntryForm assessmentEntryForm) Updates an existing assessment entry.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getCourseCatalogId
Id getCourseCatalogId()Gets theCourseCatalogIdassociated with this session.- Returns:
- the
CourseCatalog Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCourseCatalog
Gets theCourseCatalogassociated with this session.- Returns:
- the course catalog
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateAssessmentEntries
boolean canCreateAssessmentEntries()Tests if this user can createAssessmentEntries. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAssessmentEntrywill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifAssessmentEntrycreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateAssessmentEntryWithRecordTypes
Tests if this user can create a singlePorgramusing the desired record types. WhileCourseChronicleManager.getAssessmentEntryRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAssessmentEntry. Providing an empty array tests if anAssessmentEntrycan be created with no records.- Parameters:
assessmentEntryRecordTypes- array of assessment entry record types- Returns:
trueifAssessmentEntrycreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-assessmentEntryRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getAssessmentEntryFormForCreate
AssessmentEntryForm getAssessmentEntryFormForCreate(Id assessmentId, Id resourceId, Type[] assessmentEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the assessment entry form for creating new assessment entries. A new form should be requested for each create transaction.- Parameters:
assessmentId- an assessmentIdresourceId- a studentIdassessmentEntryRecordTypes- array of assessment entry record types- Returns:
- the assessment entry form
- Throws:
NotFoundException-assessmentIdorresourceIdis not foundNullArgumentException-assessmentId, resourceId, orassessmentEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createAssessmentEntry
AssessmentEntry createAssessmentEntry(AssessmentEntryForm assessmentEntryForm) throws OperationFailedException, PermissionDeniedException Creates a newAssessmentEntry.- Parameters:
assessmentEntryForm- the form for thisAssessmentEntry- Returns:
- the new
AssessmentEntry - Throws:
IllegalStateException-assessmentEntryFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-assessmentEntryFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-assessmentEntryFormdid not originate fromgetAssessmentEntryFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateAssessmentEntries
boolean canUpdateAssessmentEntries()Tests if this user can updateAssessmentEntries. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssessmentEntrywill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifAssessmentEntrymodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAssessmentEntryFormForUpdate
AssessmentEntryForm getAssessmentEntryFormForUpdate(Id assessmentEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the assessment entry form for updating an existing assessment entry. A new assessment entry form should be requested for each update transaction.- Parameters:
assessmentEntryId- theIdof theAssessmentEntry- Returns:
- the assessment entry form
- Throws:
NotFoundException-assessmentEntryIdis not foundNullArgumentException-assessmentEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAssessmentEntry
void updateAssessmentEntry(AssessmentEntryForm assessmentEntryForm) throws OperationFailedException, PermissionDeniedException Updates an existing assessment entry.- Parameters:
assessmentEntryForm- the form containing the elements to be updated- Throws:
IllegalStateException-assessmentEntryFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-assessmentEntryFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-assessmentEntryFormdid not originate fromgetAssessmentEntryFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteAssessmentEntries
boolean canDeleteAssessmentEntries()Tests if this user can deleteAssessmentEntries. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAssessmentEntrywill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifAssessmentEntrydeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canDeleteAssessmentEntry
Tests if this user can delete a specifiedAssessmentEntry. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting theAssessmentEntrywill result in aPERMISSION_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.- Parameters:
assessmentEntryId- theIdof theAssessmentEntry- Returns:
falseif deletion of thisAssessmentEntryis not authorized,trueotherwise- Throws:
NullArgumentException-assessmentEntryIdisnull- Compliance:
mandatory- This method must be implemented.- Notes:
If- the {@code assessmentEntryId} is not found, then it is acceptable to return false to indicate the lack of a delete available.
-
deleteAssessmentEntry
void deleteAssessmentEntry(Id assessmentEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAssessmentEntry.- Parameters:
assessmentEntryId- theIdof theAssessmentEntryto remove- Throws:
NotFoundException-assessmentEntryIdnot foundNullArgumentException-assessmentEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageAssessmentEntryAliases
boolean canManageAssessmentEntryAliases()Tests if this user can manageIdaliases forAssessmentEntries. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifAssessmentEntryaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAssessmentEntry
void aliasAssessmentEntry(Id assessmentEntryId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anAssessmentEntryfor the purpose of creating compatibility. The primaryIdof theAssessmentEntryis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another assessment entry, it is reassigned to the given assessment entryId.- Parameters:
assessmentEntryId- theIdof anAssessmentEntryaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis in use as a primaryIdNotFoundException-assessmentEntryIdnot foundNullArgumentException-assessmentEntryIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-