OSID Logo
OSID Specifications
course registration batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.course.registration.batch.ActivityBundleBatchAdminSession
Implementsosid.course.registration.ActivityBundleAdminSession
Description

This session creates, updates, and deletes ActivityBundles 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 ActivityBundle, a ActivityBundleForm is requested using getActivityBundleFormsForCreate() specifying the desired course offering and record Types or none if no record Types are needed. Each of the returned ActivityBundleForms 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 ActivityBundleForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ActivityBundleForm corresponds to an attempted transaction.

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

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

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

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

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

MethodgetActivityBundleFormsForCreate
Description

Gets the activity bundle forms for creating a bunch of new actvity bundles. An ActivityBundleForm is returned for each supplied course offering.

Parametersosid.id.IdListcourseOfferingIdsa list of course offering Ids
osid.type.Type[]activityBundleRecordTypesarray of activity bundle record types to be included in each create operation or an empty list if none
Returnosid.course.registration.batch.ActivityBundleBatchFormListthe activity bundle forms
ErrorsNOT_FOUNDa courseOfferingId is not found
NULL_ARGUMENT courseOfferingIds or activityBundleRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateActivityBundles
Description

Creates a new set of ActivityBundles. 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.registration.batch.ActivityBundleBatchFormListactivityBundleFormsthe activity bundle forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT activityBundleForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetActivityBundleFormsForUpdate
Description

Gets the activity bundle forms for updating an existing set of actvity bundles. A new activity bundle form should be requested for each update transaction.

Parametersosid.id.IdListactivityBundleIdsthe Ids of the ActivityBundle
Returnosid.course.registration.batch.ActivityBundleBatchFormListthe activity bundle form
ErrorsNOT_FOUNDa activityBundleId is not found
NULL_ARGUMENT activityBundleIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateActivityBundles
Description

Updates existing actvity bundles. 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.registration.batch.ActivityBundleBatchFormListactivityBundleFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT activityBundleForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllActivityBundles
Description

Deletes all ActivityBundles in this CourseCatalog .

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

Deletes actvity bundles for the given Ids.

Parametersosid.id.IdListactivityBundleIdsthe Ids of the actvity bundles to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT activityBundleIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteActivityBundlesForCourseOffering
Description

Deletes actvity bundles for the given course offering.

Parametersosid.id.IdcourseOfferingIdthe Id of a course offering
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT courseOfferingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteActivityBundlesByActivityOffering
Description

Deletes actvity bundles containing the given activity offering.

Parametersosid.id.IdactivityOfferingIdthe Id of an activity offering
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT activityOfferingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasActivityBundles
Description

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