public interface CourseOfferingBatchAdminSession extends CourseOfferingAdminSession
This session creates, updates, and deletes CourseOfferings
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
CourseOffering,
a CourseOfferingForm
is requested
using getCourseOfferingFormsForCreate()
specifying the
desired canonical course, term, and record Types
or none if
no record Types
are needed. Each of the returned
CourseOfferingForms
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 CourseOfferingForm
is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each CourseOfferingForm
corresponds to an attempted transaction.
The CourseOfferingForms
returned from
getCourseOfferingFormsForCreate()
may be linked to the originating
request through the peer Ids
of the
CourseOfferingForm.
In the case where there may be duplicates, any
CourseOfferingForm
of the same peer Ids
may
be used for a create operation.
Once a batch of CourseOfferingForms
are submitted for
create, a CreateResponse
is returned for each
CourseOfferingForm,
although the ordering is not defined. Only
errors that pertain to the entire create operation are returned from
createCourseOfferings(),
errors specific to an individual
CourseOfferingForm
are indicated in the corresponding
CreateResponse.
CreateResponses
may be
linked to the originating CourseOfferingForm
through the
CourseOfferingForm
Id
.
For updates, CourseOfferingForms
are requested to the
CourseOffering
Id
that is to be updated
using getCourseOfferingFormsForUpdate()
where the reference
Id
in the CourseOfferingForm
may be used to
link the request. Similarly, the CourseOfferingForm
has
metadata about the data that can be updated and it can perform validation
before submitting the update. The CourseOfferingForm
can
only be used once for a successful update and cannot be reused.
Once a batch of CourseOfferingForms
are submitted for
update, an UpdateResponse
is returned for each
CourseOfferingForm,
although the ordering is not defined. Only
errors that pertain to the entire update operation are returned from
updateCourseOfferings(),
errors specific to an individual
CourseOfferingForm
are indicated in the corresponding
UpdateResponse.
UpdateResponses
may be
linked to the originating CourseOfferingForm
through the
CourseOfferingForm
Id.
The delete operations delete CourseOfferings
in bulk.
To unmap a CourseOffering
from the current
CourseCatalog,
the
CourseOfferingCourseCatalogAssignmentSession
should be used. These
delete operations attempt to remove the CourseOffering
itself thus removing it from all known CourseCatalog
catalogs. Bulk delete operations return the results in
DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasCourseOfferings(AliasRequestList aliasRequests)
Adds an
Id to a CourseOffering for the
purpose of creating compatibility. |
CreateResponseList |
createCourseOfferings(CourseOfferingBatchFormList courseOfferingForms)
Creates a new set of
CourseOfferings. |
DeleteResponseList |
deleteAllCourseOfferings()
Deletes all
CourseOfferings in this
CourseCatalog . |
DeleteResponseList |
deleteCourseOfferings(IdList courseOfferingIds)
Deletes course offerings for the given
Ids. |
DeleteResponseList |
deleteCourseOfferingsForCourse(Id courseId)
Deletes course offerings for the given course.
|
DeleteResponseList |
deleteCourseOfferingsForCourseAndTerm(Id courseId,
Id termId)
Deletes course offerings for the given course and term.
|
DeleteResponseList |
deleteCourseOfferingsForTerm(Id termId)
Deletes course offerings for the given term.
|
DeleteResponseList |
deleteIneffectiveCourseOfferingsByDate(DateTime date)
Deletes course offerings ineffective before the given date.
|
CourseOfferingBatchFormList |
getCourseOfferingFormsForCreate(CourseOfferingPeerList peers,
Type[] courseOfferingRecordTypes)
Gets the course offering forms for creating a bunch of new course
offerings.
|
CourseOfferingBatchFormList |
getCourseOfferingFormsForUpdate(IdList courseOfferingIds)
Gets the course offering forms for updating an existing set of course
offerings.
|
UpdateResponseList |
updateCourseOfferings(CourseOfferingBatchFormList courseOfferingForms)
Updates existing course offerings.
|
aliasCourseOffering, canCreateCourseOfferings, canCreateCourseOfferingWithRecordTypes, canDeleteCourseOfferings, canManageCourseOfferingAliases, canUpdateCourseOfferings, createCourseOffering, deleteCourseOffering, getCourseCatalog, getCourseCatalogId, getCourseOfferingFormForCreate, getCourseOfferingFormForUpdate, updateCourseOffering
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
CourseOfferingBatchFormList getCourseOfferingFormsForCreate(CourseOfferingPeerList peers, Type[] courseOfferingRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers
- the relationship peerscourseOfferingRecordTypes
- array of course offering record
types to be included in each create operation or an empty list
if noneNotFoundException
- a courseId
or
termId
is not foundNullArgumentException
- peers
or
courseOfferingRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createCourseOfferings(CourseOfferingBatchFormList courseOfferingForms) throws OperationFailedException, PermissionDeniedException
CourseOfferings.
This method
returns an error if the entire operation fails. Otherwise, the status
of an individual create operation is indicated in the
BatchCreateResponse
.courseOfferingForms
- the course offering formsNullArgumentException
- courseOfferingForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CourseOfferingBatchFormList getCourseOfferingFormsForUpdate(IdList courseOfferingIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
courseOfferingIds
- the Ids
of the
CourseOffering
NotFoundException
- a courseOfferingId
is not foundNullArgumentException
- courseOfferingIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateCourseOfferings(CourseOfferingBatchFormList courseOfferingForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.courseOfferingForms
- the form containing the elements to be
updatedNullArgumentException
- courseOfferingForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllCourseOfferings() throws OperationFailedException, PermissionDeniedException
CourseOfferings
in this
CourseCatalog
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteCourseOfferings(IdList courseOfferingIds) throws OperationFailedException, PermissionDeniedException
Ids.
courseOfferingIds
- the Ids
of the course
offerings to deleteNullArgumentException
- courseOfferingIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteCourseOfferingsForCourse(Id courseId) throws OperationFailedException, PermissionDeniedException
courseId
- the Id
of a courseNullArgumentException
- courseId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteCourseOfferingsForTerm(Id termId) throws OperationFailedException, PermissionDeniedException
termId
- the Id
of a termNullArgumentException
- termId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteCourseOfferingsForCourseAndTerm(Id courseId, Id termId) throws OperationFailedException, PermissionDeniedException
courseId
- the Id
of a coursetermId
- the Id
of a termNullArgumentException
- courseId
or
termId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteIneffectiveCourseOfferingsByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date
- a dateNullArgumentException
- date
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasCourseOfferings(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to a CourseOffering
for the
purpose of creating compatibility. The primary Id
of
the CourseOffering
is determined by the provider. The
new Id
is an alias to the primary Id.
If
the alias is a pointer to another course offering, it is reassigned to
the given course offering Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.