OSID Logo
OSID Specifications
course syllabus batch package
Version 3.1.0
Interfaceosid.course.syllabus.batch.DocetBatchAdminSession
Implementsosid.course.syllabus.DocetAdminSession
Used Byosid.course.syllabus.batch.CourseSyllabusBatchManager
osid.course.syllabus.batch.CourseSyllabusBatchProxyManager
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.DocetPeerListpeers the relationship peers
osid.type.Type[]docetRecordTypes array of docet record types to be included in each create operation or an empty list if none
Returnosid.course.syllabus.batch.DocetBatchFormList the docet forms
ErrorsNOT_FOUND a moduleId or activityUnitId is not found
NULL_ARGUMENT peers or docetRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to request forms with given record types
Compliancemandatory This 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.DocetBatchFormListdocetForms the docet forms
Returnosid.transaction.batch.CreateResponseList the create responses
ErrorsNULL_ARGUMENT docetForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdListdocetIds the Ids of the Docet
Returnosid.course.syllabus.batch.DocetBatchFormList the docet form
ErrorsNOT_FOUND an docetId is not found
NULL_ARGUMENT docetIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.DocetBatchFormListdocetForms the form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseList the update responses
ErrorsNULL_ARGUMENT docetForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteAllDocets
Description

Deletes all Docets in this CourseCatalog.

Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteDocets
Description

Deletes docets for the given Ids.

Parametersosid.id.IdListdocetIds the Ids of the docets to delete
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT docetIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteDocetsForModule
Description

Deletes docets for the given module.

Parametersosid.id.IdmoduleId an Id of a module
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT moduleId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteDocetsForActivityUnit
Description

Deletes docets for the given activity unit.

Parametersosid.id.IdactivityUnitId an Id of a resource
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT activityUnitId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteIneffectiveDocetsByDate
Description

Deletes docets expired before the given date.

Parametersosid.calendaring.DateTimedate a date
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT date is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.AliasRequestListaliasRequests the alias requests
Returnosid.transaction.batch.AliasResponseList the alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.