Interface GradebookColumnCalculationAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can create gradebook column calculationss.booleancanCreateGradebookColumnCalculationWithRecordTypes(Type[] gradebookColumnRecordCalculationTypes) Tests if this user can create a singleGradebookColumnCalculationusing the desired record types.booleanTests if this user can delete gradebook column calculations.booleanTests if this user can update gradebook column calculations.createGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm) Creates a newGradebookColumnCalculation.voiddeleteGradebookColumnCalculation(Id gradebookColumnCalculationId) Deletes theGradebookColumnCalculationidentified by the givenId.Gets theGradebookassociated with this session.getGradebookColumnCalculationFormForCreate(Id gradebookColumnId, Type[] gradebookColumnRecordCalculationTypes) Gets the gradebook column calculation form for creating new gradebook columns.getGradebookColumnCalculationFormForUpdate(Id gradebookColumnCalculationId) Gets the gradebook column calculation form for updating an existing gradebook column.Gets theGradebookIdassociated with this session.voidupdateGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm) Updates an existing gradebook column calculation.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.
-
canCreateGradebookColumnCalculations
boolean canCreateGradebookColumnCalculations()Tests if this user can create gradebook column calculationss. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a gradebook column will 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:
falseifGradebookColumnCalculationcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateGradebookColumnCalculationWithRecordTypes
boolean canCreateGradebookColumnCalculationWithRecordTypes(Type[] gradebookColumnRecordCalculationTypes) Tests if this user can create a singleGradebookColumnCalculationusing the desired record types. WhileGradingCalculationManager.getGradebookColumnCalculationRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificGradebookColumnCalculation. Providing an empty array tests if aGradebookColumnCalculationcan be created with no records.- Parameters:
gradebookColumnRecordCalculationTypes- array of gradebook column calculation record types- Returns:
trueifGradebookColumnCalculationcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-gradebookColumnRecordCalculationTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getGradebookColumnCalculationFormForCreate
GradebookColumnCalculationForm getGradebookColumnCalculationFormForCreate(Id gradebookColumnId, Type[] gradebookColumnRecordCalculationTypes) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Gets the gradebook column calculation form for creating new gradebook columns. A new form should be requested for each create transaction.- Parameters:
gradebookColumnId- theIdfor theGradebookColumngradebookColumnRecordCalculationTypes- array of gradebook column calculation record types- Returns:
- the gradebook column calculation form
- Throws:
AlreadyExistsException-gradebookColumnIdalready has a calculationNotFoundException-gradebookColumnIdis not foundNullArgumentException-gradebokColumnIdorgradebookColumnRecordCalculationTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createGradebookColumnCalculation
GradebookColumnCalculation createGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm) throws OperationFailedException, PermissionDeniedException Creates a newGradebookColumnCalculation.- Parameters:
gradebookColumnCalculationForm- the form containing the elements to be updated- Returns:
- the new
GradebookColumnCalculation - Throws:
IllegalStateException-gradebookColumnCalculationFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-gradebookColumnCalculationFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-gradebookColumnCalculationFormdid not originate fromgetGradebookColumnCalculationFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateGradebookColumnCalculations
boolean canUpdateGradebookColumnCalculations()Tests if this user can update gradebook column calculations. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aGradebookColumnCalculationwill 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:
falseif gradebook column calculation modification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getGradebookColumnCalculationFormForUpdate
GradebookColumnCalculationForm getGradebookColumnCalculationFormForUpdate(Id gradebookColumnCalculationId) throws NotFoundException, OperationFailedException Gets the gradebook column calculation form for updating an existing gradebook column. A new gradebook column form should be requested for each update transaction.- Parameters:
gradebookColumnCalculationId- theIdof theGradebookColumnCalculation- Returns:
- the gradebook column calculation form
- Throws:
NotFoundException-gradebookColumnCalculationIdis not foundNullArgumentException-gradebookColumnCalculationIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
updateGradebookColumnCalculation
void updateGradebookColumnCalculation(GradebookColumnCalculationForm gradebookColumnCalculationForm) throws OperationFailedException, PermissionDeniedException Updates an existing gradebook column calculation.- Parameters:
gradebookColumnCalculationForm- the form containing the elements to be updated- Throws:
IllegalStateException-gradebookColumnCalculationFormalready used in a update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-gradebookColumnCalculationFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-gradebookColumnCalculationFormdid not originate fromgetGradebookColumnCalculationFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteGradebookColumnCalculations
boolean canDeleteGradebookColumnCalculations()Tests if this user can delete gradebook column calculations. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aGradebookColumnCalculationwill 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:
falseifGradebookColumnCalculationdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteGradebookColumnCalculation
void deleteGradebookColumnCalculation(Id gradebookColumnCalculationId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes theGradebookColumnCalculationidentified by the givenId.- Parameters:
gradebookColumnCalculationId- theIdof theGradebookColumnCalculationto delete- Throws:
NotFoundException- aGradebookColumnCalculationwas not found identified by the givenIdNullArgumentException-gradebookColumnCalculationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-