Interface GradebookColumnBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, GradebookColumnAdminSession, OsidSession, OsidSession
This session creates, updates, and deletes GradebookColumns in
bulk. 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
GradebookColumn , GradebookColumnForm is requested using
getGradebookColumnFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each of the returned
GradebookColumnForms 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 a GradebookColumnForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each GradebookColumnForm
corresponds to an attempted transaction.
The GradebookColumnForms returned from
getGradebookColumnFormsForCreate() may be linked to the originating
request through the peer Ids of the GradebookColumnForm .
In the case where there may be duplicates, any GradebookColumnForm
of the same peer Ids may be used for a create operation.
Once a batch of GradebookColumnForms are submitted for create,
a CreateResponse is returned for each GradebookColumnForm
, although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createGradebookColumns()
, errors specific to an individual GradebookColumnForm are
indicated in the corresponding CreateResponse .
CreateResponses may be linked to the originating
GradebookColumnForm through the GradebookColumnForm Id .
For updates, GradebookColumnForms are requested to the
GradebookColumn Id that is to be updated using
getGradebookColumnFormsForUpdate() where the reference Id in the
GradebookColumnForm may be used to link the request. Similarly,
the GradebookColumnForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
GradebookColumnForm can only be used once for a successful update
and cannot be reused.
Once a batch of GradebookColumnForms are submitted for update,
an UpdateResponse is returned for each GradebookColumnForm
, although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateGradebookColumns()
, errors specific to an individual GradebookColumnForm are
indicated in the corresponding UpdateResponse .
UpdateResponses may be linked to the originating
GradebookColumnForm through the GradebookColumnForm Id .
The delete operations delete GradebookColumns in bulk. To
unmap a GradebookColumn from the current Gradebook , the
GradebookColumnGradebookAssignmentSession should be used. These
delete operations attempt to remove the GradebookColumn itself
thus removing it from all known Gradebook catalogs. Bulk delete
operations return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasGradebookColumns(AliasRequestList aliasRequests) Adds anIdto aGradebookColumnfor the purpose of creating compatibility.createGradebookColumns(GradebookColumnBatchFormList gradebookColumnForms) Creates a new set ofGradebookColumns.Deletes allGradebookColumnsin thisGradebook.deleteGradebookColumns(IdList gradebookColumnIds) Deletes gradebook columns for the givenIds.getGradebookColumnFormsForCreate(Type[] gradebookColumnRecordTypes) Gets the gradebook column forms for creating a bunch of new gradebook columns.getGradebookColumnFormsForUpdate(IdList gradebookColumnIds) Gets the gradebook column forms for updating an existing set of gradebook columns.updateGradebookColumns(GradebookColumnBatchFormList gradebookColumnForms) Updates existing gradebook columns.Methods inherited from interface GradebookColumnAdminSession
aliasGradebookColumn, canCreateGradebookColumns, canCreateGradebookColumnWithRecordTypes, canDeleteGradebookColumns, canManageGradebookColumnAliases, canUpdateGradebookColumns, copyGradebookColumnEntries, createGradebookColumn, deleteGradebookColumn, getGradebook, getGradebookColumnFormForCreate, getGradebookColumnFormForUpdate, getGradebookId, moveGradebookColumn, sequenceGradebookColumns, updateGradebookColumnModifier and TypeMethodDescriptionvoidaliasGradebookColumn(Id gradebookColumnId, Id aliasId) Adds anIdto aGradebookColumnfor the purpose of creating compatibility.booleanTests if this user can create gradebook columns.booleancanCreateGradebookColumnWithRecordTypes(Type[] gradebookColumnRecordTypes) Tests if this user can create a singleGradebookColumnusing the desired record types.booleanTests if this user can delete gradebook columns.booleanTests if this user can manageIdaliases forGradebookColumns.booleanTests if this user can update gradebook columns.voidcopyGradebookColumnEntries(Id sourceGradebookColumnId, Id targetGradebookColumnId) Copies gradebook column entries from one column to another.createGradebookColumn(GradebookColumnForm gradebookColumnForm) Creates a newGradebookColumn.voiddeleteGradebookColumn(Id gradebookColumnId) Deletes theGradebookColumnidentified by the givenId.Gets theGradebookassociated with this session.getGradebookColumnFormForCreate(Type[] gradebookColumnRecordTypes) Gets the gradebook column form for creating new gradebook columns.getGradebookColumnFormForUpdate(Id gradebookColumnId) Gets the gradebook column form for updating an existing gradebook column.Gets theGradebookIdassociated with this session.voidmoveGradebookColumn(Id frontGradebookColumnId, Id backGradebookColumnId) Moves a gradebook column in front of another.voidsequenceGradebookColumns(IdList gradebookColumnIds) Resequences the gradebook columns.voidupdateGradebookColumn(GradebookColumnForm gradebookColumnForm) Updates an existing gradebook column.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
-
getGradebookColumnFormsForCreate
GradebookColumnBatchFormList getGradebookColumnFormsForCreate(Type[] gradebookColumnRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the gradebook column forms for creating a bunch of new gradebook columns. A form is returned for each grade entry and resource pair.- Parameters:
gradebookColumnRecordTypes- array of gradebook columnrecord types to be included in each create operation or an empty list if none- Returns:
- the gradebook column forms
- Throws:
NullArgumentException-peersorgradebookColumnRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createGradebookColumns
CreateResponseList createGradebookColumns(GradebookColumnBatchFormList gradebookColumnForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofGradebookColumns. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
gradebookColumnForms- the gradebook column forms- Returns:
- the create responses
- Throws:
NullArgumentException-gradebookColumnFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradebookColumnFormsForUpdate
GradebookColumnBatchFormList getGradebookColumnFormsForUpdate(IdList gradebookColumnIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the gradebook column forms for updating an existing set of gradebook columns. A new gradebook column form should be requested for each update transaction.- Parameters:
gradebookColumnIds- theIdsof theGradebookColumn- Returns:
- the gradebook column forms
- Throws:
NotFoundException- agradebookColumnIdis not foundNullArgumentException-gradebookColumnIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateGradebookColumns
UpdateResponseList updateGradebookColumns(GradebookColumnBatchFormList gradebookColumnForms) throws OperationFailedException, PermissionDeniedException Updates existing gradebook columns. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
gradebookColumnForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-gradebookColumnFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllGradebookColumns
DeleteResponseList deleteAllGradebookColumns() throws OperationFailedException, PermissionDeniedExceptionDeletes allGradebookColumnsin thisGradebook.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteGradebookColumns
DeleteResponseList deleteGradebookColumns(IdList gradebookColumnIds) throws OperationFailedException, PermissionDeniedException Deletes gradebook columns for the givenIds.- Parameters:
gradebookColumnIds- theIdsof the gradebook columns to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-gradebookColumnIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasGradebookColumns
AliasResponseList aliasGradebookColumns(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aGradebookColumnfor the purpose of creating compatibility. The primaryIdof theGradebookColumnis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another gradebook column, it is reassigned to the given gradebook columnId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-