Interface SyllabusBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, SyllabusAdminSession
This session creates, updates, and deletes Syllabi 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 Syllabus, a SyllabusForm is requested using getSyllabusFormsForCreate() specifying the desired course and record Types or none if no record Types are needed. Each of the returned SyllabusForms 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 SyllabusForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each SyllabusForm corresponds to an attempted transaction.
The SyllabusForms returned from getSyllabusFormsForCreate() may be linked to the originating request through the peer Ids of the SyllabusForm. In the case where there may be duplicates, any SyllabusForm of the same peer Ids may be used for a create operation.
Once a batch of SyllabusForms are submitted for create, a CreateResponse is returned for each SyllabusForm, although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createSyllabi(), errors specific to an individual SyllabusForm are indicated in the corresponding CreateResponse. CreateResponses may be linked to the originating SyllabusForm through the SyllabusForm Id.
For updates, SyllabusForms are requested to the
Syllabus Id that is to be updated using
getSyllabusFormsForUpdate() where the reference Id in the
SyllabusForm may be used to link the request. Similarly, the
SyllabusForm has metadata about the data that can be updated and it can
perform validation before submitting the update. The SyllabusForm
can only be used once for a successful update and cannot be reused.
Once a batch of SyllabusForms are submitted for update, an
UpdateResponse is returned for each SyllabusForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateSyllabi() , errors
specific to an individual SyllabusForm are indicated in the
corresponding UpdateResponse . UpdateResponses may be
linked to the originating SyllabusForm through the
SyllabusForm Id .
The delete operations delete Syllabi in bulk. To unmap a
Syllabus from the current CourseCatalog , the
SyllabusCourseCatalogAssignmentSession should be used. These delete
operations attempt to remove the Syllabus itself thus removing it
from all known CourseCatalog catalogs. Bulk delete operations
return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasSyllabi(AliasRequestList aliasRequests) Adds anIdto aSyllabusfor the purpose of creating compatibility.createSyllabi(SyllabusBatchFormList syllabusForms) Creates a new set ofSyllabi.Deletes allSyllabiin thisCourseCatalog.deleteSyllabi(IdList syllabusIds) Deletes syllabi for the givenIds.deleteSyllabiForCourse(Id courseId) Deletes syllabi for the given course.getSyllabusFormsForCreate(IdList courseIds, Type[] syllabusRecordTypes) Gets the syllabus forms for creating a bunch of new syllabi.getSyllabusFormsForUpdate(IdList syllabusIds) Gets the syllabus forms for updating an existing set of syllabi.updateSyllabi(SyllabusBatchFormList syllabusForms) Updates existing syllabi.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.Methods inherited from interface SyllabusAdminSession
aliasSyllabus, canCreateSyllabi, canCreateSyllabusWithRecordTypes, canDeleteSyllabi, canManageSyllabusAliases, canUpdateSyllabi, createSyllabus, deleteSyllabus, getCourseCatalog, getCourseCatalogId, getSyllabusFormForCreate, getSyllabusFormForUpdate, updateSyllabusModifier and TypeMethodDescriptionvoidaliasSyllabus(Id syllabusId, Id aliasId) Adds anIdto aSyllabusfor the purpose of creating compatibility.booleanTests if this user can create syllabi.booleancanCreateSyllabusWithRecordTypes(Type[] syllabusRecordTypes) Tests if this user can create a singleSyllabususing the desired record types.booleanTests if this user can delete syllabi.booleanTests if this user can manageIdaliases forComnents.booleanTests if this user can update syllabi.createSyllabus(SyllabusForm syllabusForm) Creates a newSyllabus.voiddeleteSyllabus(Id syllabusId) Deletes aSyllabus.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getSyllabusFormForCreate(Id courseId, Type[] syllabusRecordTypes) Gets the syllabus form for creating new syllabi.getSyllabusFormForUpdate(Id syllabusId) Gets the syllabus form for updating an existing syllabus.voidupdateSyllabus(SyllabusForm syllabusForm) Updates an existing syllabus.
-
Method Details
-
getSyllabusFormsForCreate
SyllabusBatchFormList getSyllabusFormsForCreate(IdList courseIds, Type[] syllabusRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the syllabus forms for creating a bunch of new syllabi. A new form is returned for each supplied course.- Parameters:
courseIds- a list of courseIdssyllabusRecordTypes- array of syllabus record types to be included in each create operation or an empty list if none- Returns:
- the syllabus forms
- Throws:
NotFoundException- acourseIdis not foundNullArgumentException-courseIdsorsyllabusRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createSyllabi
CreateResponseList createSyllabi(SyllabusBatchFormList syllabusForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofSyllabi. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
syllabusForms- the syllabus forms- Returns:
- the create responses
- Throws:
NullArgumentException-syllabusFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getSyllabusFormsForUpdate
SyllabusBatchFormList getSyllabusFormsForUpdate(IdList syllabusIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the syllabus forms for updating an existing set of syllabi. A new syllabus form should be requested for each update transaction.- Parameters:
syllabusIds- theIdsof theSyllabus- Returns:
- the syllabus form
- Throws:
NotFoundException- asyllabusIdis not foundNullArgumentException-syllabusIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateSyllabi
UpdateResponseList updateSyllabi(SyllabusBatchFormList syllabusForms) throws OperationFailedException, PermissionDeniedException Updates existing syllabi. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
syllabusForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-syllabusFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllSyllabi
Deletes allSyllabiin thisCourseCatalog.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteSyllabi
DeleteResponseList deleteSyllabi(IdList syllabusIds) throws OperationFailedException, PermissionDeniedException Deletes syllabi for the givenIds.- Parameters:
syllabusIds- theIdsof the syllabi to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-syllabusIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteSyllabiForCourse
DeleteResponseList deleteSyllabiForCourse(Id courseId) throws OperationFailedException, PermissionDeniedException Deletes syllabi for the given course.- Parameters:
courseId- a courseId- Returns:
- the delete responses
- Throws:
NullArgumentException-courseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasSyllabi
AliasResponseList aliasSyllabi(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aSyllabusfor the purpose of creating compatibility. The primaryIdof theSyllabusis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another syllabus, it is reassigned to the given syllabusId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-