public interface GradebookColumnCalculationAdminSession extends OsidSession
This session creates, updates, and deletes
GradebookColumnCalculations. 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
GradebookColumnCalculation, a
GradebookColumnCalculationForm is requested using
getGradebookColumnCalculationFormForCreate() specifying the
desired record Types or none if no record Types
are needed. The returned GradebookColumnCalculationForm
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 GradebookColumnCalculationForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each
GradebookColumnCalculationForm corresponds to an attempted
transaction.
For updates, GradebookColumnCalculationForms are
requested to the GradebookColumnCalculation Id
that is to be updated using
getGradebookColumnCalculationFormForUpdate(). Similarly, the
GradebookColumnCalculationForm has metadata about the data
that can be updated and it can perform validation before submitting the
update. The GradebookColumnCalculationForm can only be used
once for a successful update and cannot be reused.
The delete operations delete GradebookColumnCalculations.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateGradebookColumnCalculations()
Tests if this user can create gradebook column calculationss.
|
boolean |
canCreateGradebookColumnCalculationWithRecordTypes(Type[] gradebookColumnRecordCalculationTypes)
Tests if this user can create a single
GradebookColumnCalculation using the desired record types. |
boolean |
canDeleteGradebookColumnCalculations()
Tests if this user can delete gradebook column calculations.
|
boolean |
canUpdateGradebookColumnCalculations()
Tests if this user can update gradebook column calculations.
|
GradebookColumnCalculation |
createGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm)
Creates a new
GradebookColumnCalculation. |
void |
deleteGradebookColumnCalculation(Id gradebookColumnCalculationId)
Deletes the
GradebookColumnCalculation identified by
the given Id. |
Gradebook |
getGradebook()
Gets the
Gradebook associated with this session. |
GradebookColumnCalculationForm |
getGradebookColumnCalculationFormForCreate(Id gradebookColumnId,
Type[] gradebookColumnRecordCalculationTypes)
Gets the gradebook column calculation form for creating new gradebook
columns.
|
GradebookColumnCalculationForm |
getGradebookColumnCalculationFormForUpdate(Id gradebookColumnCalculationId)
Gets the gradebook column calculation form for updating an existing
gradebook column.
|
Id |
getGradebookId()
Gets the
Gradebook Id associated with
this session. |
void |
updateGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm)
Updates an existing gradebook column calculation.
|
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 canCreateGradebookColumnCalculations()
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 GradebookColumnCalculation
creation is not authorized, true
otherwisemandatory - This method must be implemented. boolean canCreateGradebookColumnCalculationWithRecordTypes(Type[] gradebookColumnRecordCalculationTypes)
GradebookColumnCalculation using the desired record types.
While
GradingCalculationManager.getGradebookColumnCalculationRecordTypes()
can be used to examine which records are supported, this
method tests which record(s) are required for creating a specific
GradebookColumnCalculation. Providing an empty array
tests if a GradebookColumnCalculation can be created
with no records.gradebookColumnRecordCalculationTypes - array of gradebook
column calculation record types true if GradebookColumnCalculation
creation using the specified record Types
is supported, false otherwiseNullArgumentException -
gradebookColumnRecordCalculationTypes is null
mandatory - This method must be implemented. GradebookColumnCalculationForm getGradebookColumnCalculationFormForCreate(Id gradebookColumnId, Type[] gradebookColumnRecordCalculationTypes) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
gradebookColumnId - the Id for the
GradebookColumn gradebookColumnRecordCalculationTypes - array of gradebook
column calculation record typesAlreadyExistsException - gradebookColumnId
already has a calculationNotFoundException - gradebookColumnId is
not foundNullArgumentException - gradebokColumnId
or gradebookColumnRecordCalculationTypes is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. GradebookColumnCalculation createGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm) throws OperationFailedException, PermissionDeniedException
GradebookColumnCalculation. gradebookColumnCalculationForm - the form containing the
elements to be updated GradebookColumnCalculation IllegalStateException -
gradebookColumnCalculationForm already used in a
create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException -
gradebookColumnCalculationForm is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException -
gradebookColumnCalculationForm did not originate from
getGradebookColumnCalculationFormForCreate() mandatory - This method must be implemented. boolean canUpdateGradebookColumnCalculations()
GradebookColumnCalculation 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 gradebook column calculation
modification is not authorized, true otherwisemandatory - This method must be implemented. GradebookColumnCalculationForm getGradebookColumnCalculationFormForUpdate(Id gradebookColumnCalculationId) throws NotFoundException, OperationFailedException
gradebookColumnCalculationId - the Id of the
GradebookColumnCalculation NotFoundException - gradebookColumnCalculationId
is not foundNullArgumentException -
gradebookColumnCalculationId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void updateGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm) throws OperationFailedException, PermissionDeniedException
gradebookColumnCalculationForm - the form containing the
elements to be updatedIllegalStateException -
gradebookColumnCalculationForm already used in a
update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException -
gradebookColumnCalculationForm is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException -
gradebookColumnCalculationForm did not originate from
getGradebookColumnCalculationFormForUpdate() mandatory - This method must be implemented. boolean canDeleteGradebookColumnCalculations()
GradebookColumnCalculation 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 GradebookColumnCalculation
deletion is not authorized, true
otherwisemandatory - This method must be implemented. void deleteGradebookColumnCalculation(Id gradebookColumnCalculationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
GradebookColumnCalculation identified by
the given Id. gradebookColumnCalculationId - the Id of the
GradebookColumnCalculation to deleteNotFoundException - a GradebookColumnCalculation
was not found identified by the given Id
NullArgumentException -
gradebookColumnCalculationId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.