Interface GradeSystemTransformAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes
GradeSystemTransforms . 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
GradeSystemTransform , a GradeSystemTransformForm is requested
using getGradeSystemTransformFormForCreate() specifying the
desired record Types or none if no record Types are
needed. The returned GradeSystemTransformForm 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
GradeSystemTransformForm is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each GradeSystemTransformForm corresponds to an
attempted transaction.
For updates, GradeSystemTransformForms are requested to the
GradeSystemTransformForm Id that is to be updated using
getGradeSystemTransformFormForUpdate() . Similarly, the
GradeSystemTransformForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
GradeSystemTransformForm can only be used once for a successful update
and cannot be reused.
The delete operations delete GradeSystemTransforms .
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddGradeMap(Id gradeSystemTransformId, Id sourceGradeId, Id targetGradeId) Adds a direct grade mapping to a transform.voidaliasGradeSystemTransform(Id gradeSystemTransformId, Id aliasId) Adds anIdto aGradeSystemTransformfor the purpose of creating compatibility.booleanTests if this user can createGradeSystemTransforms.booleancanCreateGradeSystemTransformWithRecordTypes(Type[] gradeSystemTransformRecordTypes) Tests if this user can create a singleGradeSystemTransformusing the desired record types.booleanTests if this user can delete grade system transforms.booleanTests if this user can manageIdaliases forGradeSystemTransforms.booleanTests if this user can updateGradeSystemTransforms.createGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) Creates a newGradeSystemTransform.voiddeleteGradeSystemTransform(Id gradeSystemTransformId) Deletes aGradeSystemTransform.Gets theGradebookassociated with this session.Gets theGradebookIdassociated with this session.getGradeSystemTransformFormForCreate(Id sourceGradeSystemId, Id targetGradeSystemId, Type[] gradeSystemTransformRecordTypes) Gets the grade system transform form for creating new grade system transforms.getGradeSystemTransformFormForUpdate(Id gradeSystemTransformId) Gets the grade system form for updating an existing grade system transform.voidremoveGradeMap(Id gradeSystemTransformId, Id sourceGradeId) Removes a direct grade mapping from a transform.voidupdateGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) Updates an existing grade system transform.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
-
getGradebookId
Id getGradebookId()Gets theGradebookIdassociated with this session.- Returns:
- the
Gradebook Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getGradebook
Gets theGradebookassociated with this session.- Returns:
- the
Gradebookassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateGradeSystemTransforms
boolean canCreateGradeSystemTransforms()Tests if this user can createGradeSystemTransforms. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aGradeSystemTransformwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.- Returns:
falseifGradeSystemTransformcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateGradeSystemTransformWithRecordTypes
Tests if this user can create a singleGradeSystemTransformusing the desired record types. WhileGradingTransformManager.getGradeSystemTransformRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificGradeSystemTransform. Providing an empty array tests if aGradeSystemTransformcan be created with no records.- Parameters:
gradeSystemTransformRecordTypes- array of grade system transform record types- Returns:
trueifGradeSystemTransformcreation using the specifiedTypesis supported,falseotherwise- Throws:
NullArgumentException-gradeSystemTransformRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getGradeSystemTransformFormForCreate
GradeSystemTransformForm getGradeSystemTransformFormForCreate(Id sourceGradeSystemId, Id targetGradeSystemId, Type[] gradeSystemTransformRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the grade system transform form for creating new grade system transforms. A new form should be requested for each create transaction.- Parameters:
sourceGradeSystemId- theIdfor the sourceGradeSystemtargetGradeSystemId- theIdfor the sourceGradeSystemgradeSystemTransformRecordTypes- array of grade system transform record types- Returns:
- the grade system transform form
- Throws:
NotFoundException-sourceHradeSystemIdortargetGradeSystemIdnot foundNullArgumentException-sourceGradeSystemId, targetGradeSystemId,gradeSystemTransformRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createGradeSystemTransform
GradeSystemTransform createGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) throws OperationFailedException, PermissionDeniedException Creates a newGradeSystemTransform.- Parameters:
gradeSystemTransformForm- the form for thisGradeSystemTransform- Returns:
- the new
GradeSystemTransform - Throws:
IllegalStateException-gradeSystemTransformFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-gradeSystemTransformFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-gradeSystemTransformFormdid not originate fromgetGradeSystemTransformFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateGradeSystemTransforms
boolean canUpdateGradeSystemTransforms()Tests if this user can updateGradeSystemTransforms. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aGradeSystemTransformwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.- Returns:
falseifGradeSystemTransformmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getGradeSystemTransformFormForUpdate
GradeSystemTransformForm getGradeSystemTransformFormForUpdate(Id gradeSystemTransformId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the grade system form for updating an existing grade system transform. A new grade system transform form should be requested for each update transaction.- Parameters:
gradeSystemTransformId- theIdof theGradeSystemTransform- Returns:
- the grade system transform form
- Throws:
NotFoundException-gradeSystemTransformIdis not foundNullArgumentException-gradeSystemTransformIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateGradeSystemTransform
void updateGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) throws OperationFailedException, PermissionDeniedException Updates an existing grade system transform.- Parameters:
gradeSystemTransformForm- the form containing the elements to be updated- Throws:
IllegalStateException-gradeSystemTransformFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-gradeSystemTransformFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-gradeSystemTransformFormdid not originate fromgetGradeSystemTransformFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteGradeSystemTransforms
boolean canDeleteGradeSystemTransforms()Tests if this user can delete grade system transforms. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aGradeSystemTransformwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.- Returns:
falseifGradeSystemTransformdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteGradeSystemTransform
void deleteGradeSystemTransform(Id gradeSystemTransformId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aGradeSystemTransform.- Parameters:
gradeSystemTransformId- theIdof theGradeSystemTransformto remove- Throws:
NotFoundException-gradeSystemTransformIdnot foundNullArgumentException-gradeSystemTransformIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageGradeSystemTransformAliases
boolean canManageGradeSystemTransformAliases()Tests if this user can manageIdaliases forGradeSystemTransforms. 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:
falseifGradeSystemTransformaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasGradeSystemTransform
void aliasGradeSystemTransform(Id gradeSystemTransformId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aGradeSystemTransformfor the purpose of creating compatibility. The primaryIdof theGradeSystemTransformis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another grade system transform, it is reassigned to the given grade system transformId.- Parameters:
gradeSystemTransformId- theIdof aGradeSystemTransformaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-gradeSystemTransformIdnot foundNullArgumentException-gradeSystemTransformIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
addGradeMap
void addGradeMap(Id gradeSystemTransformId, Id sourceGradeId, Id targetGradeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds a direct grade mapping to a transform.- Parameters:
gradeSystemTransformId- theIdof aGradeSystemTransformsourceGradeId- the source gradeIdtargetGradeId- the target gradeId- Throws:
AlreadyExistsException-sourceGradeIdis already mappedNotFoundException-gradeSystemTransformId, sourceGradeIdortargetGradeIdnot foundNullArgumentException-gradeSystemTransformId, sourceGradeIdortargetGradeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeGradeMap
void removeGradeMap(Id gradeSystemTransformId, Id sourceGradeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes a direct grade mapping from a transform.- Parameters:
gradeSystemTransformId- theIdof aGradeSystemTransformsourceGradeId- the source gradeId- Throws:
NotFoundException- no mapping ingradeSystemTransformIdforsourceGradeIdNullArgumentException-gradeSystemTransformIdorsourceGradeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-