public interface ActivityBundleBatchAdminSession extends ActivityBundleAdminSession
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.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasActivityBundles(AliasRequestList aliasRequests)
Adds an
Id to a ActivityBundle for the
purpose of creating compatibility. |
CreateResponseList |
createActivityBundles(ActivityBundleBatchFormList activityBundleForms)
Creates a new set of
ActivityBundles. |
DeleteResponseList |
deleteActivityBundles(IdList activityBundleIds)
Deletes actvity bundles for the given
Ids. |
DeleteResponseList |
deleteActivityBundlesByActivityOffering(Id activityOfferingId)
Deletes actvity bundles containing the given activity offering.
|
DeleteResponseList |
deleteActivityBundlesForCourseOffering(Id courseOfferingId)
Deletes actvity bundles for the given course offering.
|
DeleteResponseList |
deleteAllActivityBundles()
Deletes all
ActivityBundles in this
CourseCatalog . |
ActivityBundleBatchFormList |
getActivityBundleFormsForCreate(IdList courseOfferingIds,
Type[] activityBundleRecordTypes)
Gets the activity bundle forms for creating a bunch of new actvity
bundles.
|
ActivityBundleBatchFormList |
getActivityBundleFormsForUpdate(IdList activityBundleIds)
Gets the activity bundle forms for updating an existing set of actvity
bundles.
|
UpdateResponseList |
updateActivityBundles(ActivityBundleBatchFormList activityBundleForms)
Updates existing actvity bundles.
|
aliasActivityBundle, canCreateActivityBundles, canCreateActivityBundlesForCourseOffering, canCreateActivityBundleWithRecordTypes, canDeleteActivityBundles, canManageActivityBundleAliases, canUpdateActivityBundles, createActivityBundle, deleteActivityBundle, getActivityBundleFormForCreate, getActivityBundleFormForUpdate, getCourseCatalog, getCourseCatalogId, updateActivityBundle
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
ActivityBundleBatchFormList getActivityBundleFormsForCreate(IdList courseOfferingIds, Type[] activityBundleRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseOfferingIds
- a list of course offering Ids
activityBundleRecordTypes
- array of activity bundle record
types to be included in each create operation or an empty list
if noneNotFoundException
- a courseOfferingId
is not foundNullArgumentException
- courseOfferingIds
or activityBundleRecordTypes
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createActivityBundles(ActivityBundleBatchFormList activityBundleForms) throws OperationFailedException, PermissionDeniedException
ActivityBundles.
This method
returns an error if the entire operation fails. Otherwise, the status
of an individual create operation is indicated in the
BatchCreateResponse
.activityBundleForms
- the activity bundle formsNullArgumentException
- activityBundleForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ActivityBundleBatchFormList getActivityBundleFormsForUpdate(IdList activityBundleIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityBundleIds
- the Ids
of the
ActivityBundle
NotFoundException
- a activityBundleId
is not foundNullArgumentException
- activityBundleIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateActivityBundles(ActivityBundleBatchFormList activityBundleForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.activityBundleForms
- the form containing the elements to be
updatedNullArgumentException
- activityBundleForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllActivityBundles() throws OperationFailedException, PermissionDeniedException
ActivityBundles
in this
CourseCatalog
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteActivityBundles(IdList activityBundleIds) throws OperationFailedException, PermissionDeniedException
Ids.
activityBundleIds
- the Ids
of the actvity
bundles to deleteNullArgumentException
- activityBundleIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteActivityBundlesForCourseOffering(Id courseOfferingId) throws OperationFailedException, PermissionDeniedException
courseOfferingId
- the Id
of a course offeringNullArgumentException
- courseOfferingId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteActivityBundlesByActivityOffering(Id activityOfferingId) throws OperationFailedException, PermissionDeniedException
activityOfferingId
- the Id
of an activity
offeringNullArgumentException
- activityOfferingId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasActivityBundles(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
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.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.