public interface GradeSystemTransformAdminSession extends 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.
| Modifier and Type | Method and Description |
|---|---|
void |
addGradeMap(Id gradeSystemTransformId,
Id sourceGradeId,
Id targetGradeId)
Adds a direct grade mapping to a transform.
|
void |
aliasGradeSystemTransform(Id gradeSystemTransformId,
Id aliasId)
Adds an
Id to a GradeSystemTransform for
the purpose of creating compatibility. |
boolean |
canCreateGradeSystemTransforms()
Tests if this user can create
GradeSystemTransforms. |
boolean |
canCreateGradeSystemTransformWithRecordTypes(Type[] gradeSystemTransformRecordTypes)
Tests if this user can create a single
GradeSystemTransform
using the desired record types. |
boolean |
canDeleteGradeSystemTransforms()
Tests if this user can delete grade system transforms.
|
boolean |
canManageGradeSystemTransformAliases()
Tests if this user can manage
Id aliases for
GradeSystemTransforms. |
boolean |
canUpdateGradeSystemTransforms()
Tests if this user can update
GradeSystemTransforms. |
GradeSystemTransform |
createGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm)
Creates a new
GradeSystemTransform. |
void |
deleteGradeSystemTransform(Id gradeSystemTransformId)
Deletes a
GradeSystemTransform. |
Gradebook |
getGradebook()
Gets the
Gradebook associated with this session. |
Id |
getGradebookId()
Gets the
Gradebook Id associated with
this session. |
GradeSystemTransformForm |
getGradeSystemTransformFormForCreate(Id sourceGradeSystemId,
Id targetGradeSystemId,
Type[] gradeSystemTransformRecordTypes)
Gets the grade system transform form for creating new grade system
transforms.
|
GradeSystemTransformForm |
getGradeSystemTransformFormForUpdate(Id gradeSystemTransformId)
Gets the grade system form for updating an existing grade system
transform.
|
void |
removeGradeMap(Id gradeSystemTransformId,
Id sourceGradeId)
Removes a direct grade mapping from a transform.
|
void |
updateGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm)
Updates an existing grade system transform.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getGradebookId()
Gradebook Id associated with
this session. Gradebook Id associated with this sessionmandatory - This method must be implemented. Gradebook getGradebook() throws OperationFailedException, PermissionDeniedException
Gradebook associated with this session. Gradebook associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateGradeSystemTransforms()
GradeSystemTransforms. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known creating a
GradeSystemTransform 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 GradeSystemTransform
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateGradeSystemTransformWithRecordTypes(Type[] gradeSystemTransformRecordTypes)
GradeSystemTransform
using the desired record types. While
GradingTransformManager.getGradeSystemTransformRecordTypes()
can be used to examine which records are supported, this method tests
which record(s) are required for creating a specific
GradeSystemTransform. Providing an empty array tests if a
GradeSystemTransform can be created with no records.gradeSystemTransformRecordTypes - array of grade system
transform record types true if GradeSystemTransform
creation using the specified Types is
supported, false otherwiseNullArgumentException -
gradeSystemTransformRecordTypes is null mandatory - This method must be implemented. GradeSystemTransformForm getGradeSystemTransformFormForCreate(Id sourceGradeSystemId, Id targetGradeSystemId, Type[] gradeSystemTransformRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
sourceGradeSystemId - the Id for the source
GradeSystem targetGradeSystemId - the Id for the source
GradeSystem gradeSystemTransformRecordTypes - array of grade system
transform record typesNotFoundException - sourceHradeSystemId
or targetGradeSystemId not foundNullArgumentException - sourceGradeSystemId,
targetGradeSystemId,
gradeSystemTransformRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. GradeSystemTransform createGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) throws OperationFailedException, PermissionDeniedException
GradeSystemTransform. gradeSystemTransformForm - the form for this
GradeSystemTransform GradeSystemTransform IllegalStateException - gradeSystemTransformForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - gradeSystemTransformForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - gradeSystemTransformForm
did not originate from
getGradeSystemTransformFormForCreate() mandatory - This method must be implemented. boolean canUpdateGradeSystemTransforms()
GradeSystemTransforms. A
return of true does not guarantee successful authorization. A return
of false indicates that it is known updating a
GradeSystemTransform 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 GradeSystemTransform
modification is not authorized, true otherwisemandatory - This method must be implemented. GradeSystemTransformForm getGradeSystemTransformFormForUpdate(Id gradeSystemTransformId) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradeSystemTransformId - the Id of the
GradeSystemTransform NotFoundException - gradeSystemTransformId
is not foundNullArgumentException - gradeSystemTransformId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateGradeSystemTransform(GradeSystemTransformForm gradeSystemTransformForm) throws OperationFailedException, PermissionDeniedException
gradeSystemTransformForm - the form containing the elements to
be updatedIllegalStateException - gradeSystemTransformForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - gradeSystemTransformForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - gradeSystemTransformForm
did not originate from
getGradeSystemTransformFormForUpdate() mandatory - This method must be implemented. boolean canDeleteGradeSystemTransforms()
GradeSystemTransform
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 GradeSystemTransform
deletion is not authorized, true otherwisemandatory - This method must be implemented. void deleteGradeSystemTransform(Id gradeSystemTransformId) throws NotFoundException, OperationFailedException, PermissionDeniedException
GradeSystemTransform. gradeSystemTransformId - the Id of the
GradeSystemTransform to removeNotFoundException - gradeSystemTransformId
not foundNullArgumentException - gradeSystemTransformId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageGradeSystemTransformAliases()
Id aliases for
GradeSystemTransforms. 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 GradeSystemTransform
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasGradeSystemTransform(Id gradeSystemTransformId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a GradeSystemTransform for
the purpose of creating compatibility. The primary Id
of the GradeSystemTransform is determined by the
provider. The new Id performs as an alias to the
primary Id. If the alias is a pointer to another grade
system transform, it is reassigned to the given grade system transform
Id. gradeSystemTransformId - the Id of a
GradeSystemTransform aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - gradeSystemTransformId
not foundNullArgumentException - gradeSystemTransformId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addGradeMap(Id gradeSystemTransformId, Id sourceGradeId, Id targetGradeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
gradeSystemTransformId - the Id of a
GradeSystemTransform sourceGradeId - the source grade Id targetGradeId - the target grade Id AlreadyExistsException - sourceGradeId
is already mappedNotFoundException - gradeSystemTransformId,
sourceGradeId or targetGradeId not
foundNullArgumentException - gradeSystemTransformId,
sourceGradeId or targetGradeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeGradeMap(Id gradeSystemTransformId, Id sourceGradeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradeSystemTransformId - the Id of a
GradeSystemTransform sourceGradeId - the source grade Id NotFoundException - no mapping in
gradeSystemTransformId for sourceGradeId
NullArgumentException - gradeSystemTransformId
or sourceGradeId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.