OSID Logo
OSID Specifications
course chronicle batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.course.chronicle.batch.ProgramEntryBatchAdminSession
Implementsosid.course.chronicle.ProgramEntryAdminSession
Description

This session creates, updates, and deletes ProgramEntries 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 ProgramEntry, a ProgramEntryForm is requested using getProgramEntryFormsForCreate() specifying the desired program, student, and record Types or none if no record Types are needed. Each of the returned ProgramEntryForms 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 ProgramEntryForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ProgramEntryForm corresponds to an attempted transaction.

The ProgramEntryForms returned from getProgramEntryFormsForCreate() may be linked to the originating request through the peer Ids of the ProgramEntryForm. In the case where there may be duplicates, any ProgramEntryForm of the same peer Ids may be used for a create operation.

Once a batch of ProgramEntryForms are submitted for create, a CreateResponse is returned for each ProgramEntryForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createProgramEntries(), errors specific to an individual ProgramEntryForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating ProgramEntryForm through the ProgramEntryForm Id .

For updates, ProgramEntryForms are requested to the ProgramEntry Id that is to be updated using getProgramEntryFormsForUpdate() where the reference Id in the ProgramEntryForm may be used to link the request. Similarly, the ProgramEntryForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ProgramEntryForm can only be used once for a successful update and cannot be reused.

Once a batch of ProgramEntryForms are submitted for update, an UpdateResponse is returned for each ProgramEntryForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updateProgramEntries(), errors specific to an individual ProgramEntryForm are indicated in the corresponding UpdateResponse. UpdateResponses may be linked to the originating ProgramEntryForm through the ProgramEntryForm Id.

The delete operations delete ProgramEntries in bulk. To unmap a ProgramEntry from the current CourseCatalog, the ProgramEntryCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the ProgramEntry itself thus removing it from all known CourseCatalog catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetProgramEntryFormsForCreate
Description

Gets the program entry forms for creating a bunch of new program entries. A ProgramEntryForm is returned for each program and student pair.

Parametersosid.course.chronicle.batch.ProgramEntryPeerListpeersa list of program entry peers
osid.type.Type[]programEntryRecordTypesarray of program entry record types to be included in each create operation or an empty list if none
Returnosid.course.chronicle.batch.ProgramEntryBatchFormListthe program entry forms
ErrorsNOT_FOUNDa programId or studentId is not found
NULL_ARGUMENT peers or programEntryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateProgramEntries
Description

Creates a new set of ProgramEntries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.course.chronicle.batch.ProgramEntryBatchFormListprogramEntryFormsthe program entry forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT programEntryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetProgramEntryFormsForUpdate
Description

Gets the program entry forms for updating an existing set of program entries. A new program entry form should be requested for each update transaction.

Parametersosid.id.IdListprogramEntryIdsthe Ids of the ProgramEntry
Returnosid.course.chronicle.batch.ProgramEntryBatchFormListthe program entry form
ErrorsNOT_FOUNDa programEntryId is not found
NULL_ARGUMENT programEntryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateProgramEntries
Description

Updates existing program entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.course.chronicle.batch.ProgramEntryBatchFormListprogramEntryFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT programEntryForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllProgramEntries
Description

Deletes all ProgramEntries in this CourseCatalog .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteProgramEntries
Description

Deletes program entries for the given Ids.

Parametersosid.id.IdListprogramEntryIdsthe Ids of the program entries to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT programEntryIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteProgramEntriesForProgram
Description

Deletes program entries for the given program.

Parametersosid.id.IdprogramIdthe Id of a program
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT programId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteProgramEntriesForStudent
Description

Deletes program entries for the given student

Parametersosid.id.IdresourceIdthe Id of a student
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteIneffectiveProgramEntriesByDate
Description

Deletes program entries expired before the given date.

Parametersosid.calendaring.DateTimedatea date
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT date is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasProgramEntries
Description

Adds an Id to a ProgramEntry for the purpose of creating compatibility. The primary Id of the ProgramEntry is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another program entry, it is reassigned to the given program entry Id.

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.