OSID Logo
OSID Specifications
course syllabus batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.course.syllabus.batch.DocetBatchAdminSession
Implementsosid.course.syllabus.DocetAdminSession
Description

This session creates, updates, and deletes Docets 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 an Docet, an DocetForm is requested using getDocetFormsForCreate() specifying the desired module, activity unit, and record Types or none if no record Types are needed. Each of the returned DocetForms 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 an DocetForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each DocetForm corresponds to an attempted transaction.

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

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

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

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

The delete operations delete Docets in bulk. To unmap an Docet from the current CourseCatalog, the DocetCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the Docet itself thus removing it from all known CourseCatalog catalogs. Bulk delete operations return the results in DeleteResponses.

MethodgetDocetFormsForCreate
Description

Gets the docet forms for creating a bunch of new docets. A form is returned for each activity and resource pair.

Parametersosid.course.syllabus.batch.DocetPeerListpeersthe relationship peers
osid.type.Type[]docetRecordTypesarray of docet record types to be included in each create operation or an empty list if none
Returnosid.course.syllabus.batch.DocetBatchFormListthe docet forms
ErrorsNOT_FOUNDa moduleId or activityUnitId is not found
NULL_ARGUMENT peers or docetRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateDocets
Description

Creates a new set of Docets. 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.syllabus.batch.DocetBatchFormListdocetFormsthe docet forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT docetForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetDocetFormsForUpdate
Description

Gets the docet forms for updating an existing set of docets. A new docet form should be requested for each update transaction.

Parametersosid.id.IdListdocetIdsthe Ids of the Docet
Returnosid.course.syllabus.batch.DocetBatchFormListthe docet form
ErrorsNOT_FOUNDan docetId is not found
NULL_ARGUMENT docetIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDocets
Description

Updates existing docets. 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.syllabus.batch.DocetBatchFormListdocetFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT docetForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllDocets
Description

Deletes all Docets in this CourseCatalog .

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

Deletes docets for the given Ids.

Parametersosid.id.IdListdocetIdsthe Ids of the docets to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT docetIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteDocetsForModule
Description

Deletes docets for the given module.

Parametersosid.id.IdmoduleIdan Id of a module
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT moduleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteDocetsForActivityUnit
Description

Deletes docets for the given activity unit.

Parametersosid.id.IdactivityUnitIdan Id of a resource
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT activityUnitId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteIneffectiveDocetsByDate
Description

Deletes docets 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.
MethodaliasDocets
Description

Adds an Id to an Docet for the purpose of creating compatibility. The primary Id of the Docet is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another docet, it is reassigned to the given docet 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.