Interface GradeSystemBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, GradeSystemAdminSession, OsidSession, OsidSession
This session creates, updates, and deletes GradeSystems 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 a
GradeSystem , a GradeSystemForm is requested using
getGradeSystemFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each of the returned
GradeSystemForms 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 GradeSystemForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each GradeSystemForm corresponds
to an attempted transaction.
The GradeSystemForms returned from
getGradeSystemFormsForCreate() may be linked to the originating request
through the peer Ids of the GradeSystemForm . In the case
where there may be duplicates, any GradeSystemForm of the same
peer Ids may be used for a create operation.
Once a batch of GradeSystemForms are submitted for create, a
CreateResponse is returned for each GradeSystemForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createGradeSystems() ,
errors specific to an individual GradeSystemForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating GradeSystemForm through the
GradeSystemForm Id .
For updates, GradeSystemForms are requested to the
GradeSystem Id that is to be updated using
getGradeSystemFormsForUpdate() where the reference Id in the
GradeSystemForm may be used to link the request. Similarly, the
GradeSystemForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
GradeSystemForm can only be used once for a successful update and cannot
be reused.
Once a batch of GradeSystemForms are submitted for update, an
UpdateResponse is returned for each GradeSystemForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateGradeSystems() ,
errors specific to an individual GradeSystemForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating GradeSystemForm through the
GradeSystemForm Id .
The delete operations delete GradeSystems in bulk. To unmap a
GradeSystem from the current Gradebook , the
GradeSystemGradebookAssignmentSession should be used. These delete
operations attempt to remove the GradeSystem itself thus removing
it from all known Gradebook catalogs. Bulk delete operations
return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasGradeSystems(AliasRequestList aliasRequests) Adds anIdto aGradeSystemfor the purpose of creating compatibility.createGradeSystems(GradeSystemBatchFormList gradeSystemForms) Creates a new set ofGradeSystems.Deletes allGradeSystemsin thisGradebook.deleteGradeSystems(IdList gradeSystemIds) Deletes grade systems for the givenIds.getGradeSystemFormsForCreate(long number, Type[] gradeSystemRecordTypes) Gets the grade system forms for creating a bunch of new grade systems.getGradeSystemFormsForUpdate(IdList gradeSystemIds) Gets the grade system forms for updating an existing set of grade systems.updateGradeSystems(GradeSystemBatchFormList gradeSystemForms) Updates existing grade systems.Methods inherited from interface GradeSystemAdminSession
aliasGrade, aliasGradeSystem, canCreateGrades, canCreateGradeSystems, canCreateGradeSystemWithRecordTypes, canCreateGradeWithRecordTypes, canDeleteGrades, canDeleteGradeSystems, canManageGradeAliases, canManageGradeSystemAliases, canUpdateGrades, canUpdateGradeSystems, createGrade, createGradeSystem, deleteGrade, deleteGradeSystem, getGradebook, getGradebookId, getGradeFormForCreate, getGradeFormForUpdate, getGradeSystemFormForCreate, getGradeSystemFormForUpdate, updateGrade, updateGradeSystemModifier and TypeMethodDescriptionvoidaliasGrade(Id gradeId, Id aliasId) Deprecated.as of 3.0.0rc6.voidaliasGradeSystem(Id gradeSystemId, Id aliasId) Adds anIdto aGradeSystemfor the purpose of creating compatibility.booleancanCreateGrades(Id gradeSystemId) Deprecated.as of 3.0.0rc6.booleanTests if this user can createGradeSystems.booleancanCreateGradeSystemWithRecordTypes(Type[] gradeSystemRecordTypes) Tests if this user can create a singleGradeSystemusing the desired record types.booleancanCreateGradeWithRecordTypes(Id gradeSystemId, Type[] gradeRecordTypes) Deprecated.as of 3.0.0rc6.booleancanDeleteGrades(Id gradeSystemId) Deprecated.as of 3.0.0rc6.booleanTests if this user can delete grade systems.booleanDeprecated.as of 3.0.0rc6.booleanTests if this user can manageIdaliases forGradeSystems.booleancanUpdateGrades(Id gradeSystemId) Deprecated.as of 3.0.0rc6.booleanTests if this user can updateGradeSystems.createGrade(GradeForm gradeForm) Deprecated.as of 3.0.0rc6.createGradeSystem(GradeSystemForm gradeSystemForm) Creates a newGradeSystem.voiddeleteGrade(Id gradeId) Deletes aGrade.voiddeleteGradeSystem(Id gradeSystemId) Deletes aGradeSystem.Gets theGradebookassociated with this session.Gets theGradebookIdassociated with this session.getGradeFormForCreate(Id gradeSystemId, Type[] gradeRecordTypes) Deprecated.as of 3.0.0rc6.getGradeFormForUpdate(Id gradeId) Deprecated.as of 3.0.0rc6.getGradeSystemFormForCreate(Type[] gradeSystemRecordTypes) Gets the grade system form for creating new grade systems.getGradeSystemFormForUpdate(Id gradeSystemId) Gets the grade system form for updating an existing grade system.voidupdateGrade(GradeForm gradeForm) Deprecated.as of 3.0.0rc6.voidupdateGradeSystem(GradeSystemForm gradeSystemForm) Updates an existing grade system.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
-
getGradeSystemFormsForCreate
GradeSystemBatchFormList getGradeSystemFormsForCreate(long number, Type[] gradeSystemRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the grade system forms for creating a bunch of new grade systems.- Parameters:
number- the number of forms to retrievegradeSystemRecordTypes- array of grade system record types to be included in each create operation or an empty list if none- Returns:
- the grade system forms
- Throws:
NullArgumentException-gradeSystemRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createGradeSystems
CreateResponseList createGradeSystems(GradeSystemBatchFormList gradeSystemForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofGradeSystems. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
gradeSystemForms- the grade system forms- Returns:
- the create responses
- Throws:
NullArgumentException-gradeSystemFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGradeSystemFormsForUpdate
GradeSystemBatchFormList getGradeSystemFormsForUpdate(IdList gradeSystemIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the grade system forms for updating an existing set of grade systems. A new grade system form should be requested for each update transaction.- Parameters:
gradeSystemIds- theIdsof theGradeSystem- Returns:
- the grade system forms
- Throws:
NotFoundException- agradeSystemIdis not foundNullArgumentException-gradeSystemIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateGradeSystems
UpdateResponseList updateGradeSystems(GradeSystemBatchFormList gradeSystemForms) throws OperationFailedException, PermissionDeniedException Updates existing grade systems. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
gradeSystemForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-gradeSystemFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllGradeSystems
DeleteResponseList deleteAllGradeSystems() throws OperationFailedException, PermissionDeniedExceptionDeletes allGradeSystemsin thisGradebook.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteGradeSystems
DeleteResponseList deleteGradeSystems(IdList gradeSystemIds) throws OperationFailedException, PermissionDeniedException Deletes grade systems for the givenIds.- Parameters:
gradeSystemIds- theIdsof the grade systems to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-gradeSystemIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasGradeSystems
AliasResponseList aliasGradeSystems(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aGradeSystemfor the purpose of creating compatibility. The primaryIdof theGradeSystemis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another grade system, it is reassigned to the given grade systemId.- 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.
-