Interface RegistrationTargetBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, RegistrationTargetAdminSession
This session creates, updates, and deletes RegistrationTargets
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
RegistrationTarget , a RegistrationTargetForm is requested using
getRegistrationTargetFormsForCreate() specifying the desired
course offering and record Types or none if no record
Types are needed. Each of the returned RegistrationTargetForms
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
RegistrationTargetForm is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each RegistrationTargetForm corresponds to an
attempted transaction.
The RegistrationTargetForms returned from
getRegistrationTargetFormFormsForCreate() may be linked to the
originating request through the peer Ids of the
RegistrationTargetForm . In the case where there may be duplicates, any
RegistrationTargetForm of the same peer Ids may be used
for a create operation.
Once a batch of RegistrationTargetForms are submitted for
create, a CreateResponse is returned for each
RegistrationTargetForm , although the ordering is not defined. Only
errors that pertain to the entire create operation are returned from
createRegistrationTargetForms() , errors specific to an individual
RegistrationTargetForm are indicated in the corresponding
CreateResponse . CreateResponses may be linked to the originating
RegistrationTargetForm through the RegistrationTargetForm
Id .
For updates, RegistrationTargetForms are requested to the
RegistrationTargetForm Id that is to be updated using
geRegistrationTargetFormsForUpdate() where the reference
Id in the RegistrationTargetForm may be used to link the request.
Similarly, the RegistrationTargetForm has metadata about the data
that can be updated and it can perform validation before submitting the
update. The RegistrationTargetForm can only be used once for a
successful update and cannot be reused.
Once a batch of RegistrationTargetForms are submitted for
update, an UpdateResponse is returned for each
RegistrationTargetForm , although the ordering is not defined. Only
errors that pertain to the entire update operation are returned from
updateRegistrationTargets() , errors specific to an individual
RegistrationTargetForm are indicated in the corresponding
UpdateResponse . UpdateResponses may be linked to the originating
RegistrationTargetForm through the RegistrationTargetForm
Id .
The delete operations delete RegistrationTargets in bulk. To
unmap a RegistrationTarget from the current CourseCatalog
, the RegistrationTargetCourseCatalogAssignmentSession should be
used. These delete operations attempt to remove the
RegistrationTarget itself thus removing it from all known
CourseCatalog catalogs. Bulk delete operations return the results in
DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasRegistrationTargets(AliasRequestList aliasRequests) Adds anIdto aRegistrationTargetfor the purpose of creating compatibility.createRegistrationTargets(RegistrationTargetBatchFormList registrationTargetForms) Creates a new set ofRegistrationTargets.Deletes allRegistrationTargetsin thisCourseCatalog.deleteRegistrationTargets(IdList registrationTargetIds) Deletes registration targets for the givenIds.deleteRegistrationTargetsByActivityOffering(Id activityOfferingId) Deletes registration targets containing the given activity offering.deleteRegistrationTargetsForCourseOffering(Id courseOfferingId) Deletes registration targets for the given course offering.getRegistrationTargetFormsForCreate(IdList courseOfferingIds, Type[] registrationTargetRecordTypes) Gets the registration target forms for creating a bunch of new registration targets.getRegistrationTargetFormsForUpdate(IdList registrationTargetIds) Gets the registration target forms for updating an existing set of registration targets.updateRegistrationTargets(RegistrationTargetBatchFormList registrationTargetForms) Updates existing registration targets.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 RegistrationTargetAdminSession
aliasRegistrationTarget, canCreateRegistrationTargets, canCreateRegistrationTargetWithRecordTypes, canDeleteRegistrationTargets, canManageRegistrationTargetAliases, canUpdateRegistrationTargets, createRegistrationTarget, deleteRegistrationTarget, getCourseCatalog, getCourseCatalogId, getRegistrationTargetFormForCreate, getRegistrationTargetFormForUpdate, updateRegistrationTargetModifier and TypeMethodDescriptionvoidaliasRegistrationTarget(Id registrationTargetId, Id aliasId) Adds anIdto aRegistrationTarget for the purpose of creating compatibility.booleanTests if this user can createRegistrationTargets.booleancanCreateRegistrationTargetWithRecordTypes(Type[] registrationTargetRecordTypes) Tests if this user can create a singleRegistrationTarget using the desired record types.booleanTests if this user can deleteRegistrationTargets.booleanTests if this user can manageIdaliases forRegistrationTargets A return of true does not guarantee successful authorization.booleanTests if this user can updateRegistrationTargets.createRegistrationTarget(RegistrationTargetForm registrationTargetForm) Creates a newRegistrationTarget.voiddeleteRegistrationTarget(Id registrationTargetId) Deletes aRegistrationTarget.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getRegistrationTargetFormForCreate(Id courseOfferingId, Type[] registrationTargetRecordTypes) Gets the registration target form for creating new registration targets.getRegistrationTargetFormForUpdate(Id registrationTargetId) Gets the registration target form for updating an existing registration target.voidupdateRegistrationTarget(RegistrationTargetForm registrationTargetForm) Updates an existing registration target.
-
Method Details
-
getRegistrationTargetFormsForCreate
RegistrationTargetBatchFormList getRegistrationTargetFormsForCreate(IdList courseOfferingIds, Type[] registrationTargetRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration target forms for creating a bunch of new registration targets. ARegistrationTargetFormis returned for each supplied course offering.- Parameters:
courseOfferingIds- a list of course offeringIdsregistrationTargetRecordTypes- array of registration target record types to be included in each create operation or an empty list if none- Returns:
- the registration target forms
- Throws:
NotFoundException- acourseOfferingIdis not foundNullArgumentException-courseOfferingIdsorregistrationTargetRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createRegistrationTargets
CreateResponseList createRegistrationTargets(RegistrationTargetBatchFormList registrationTargetForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofRegistrationTargets. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
registrationTargetForms- the registration target forms- Returns:
- the create responses
- Throws:
NullArgumentException-registrationTargetFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRegistrationTargetFormsForUpdate
RegistrationTargetBatchFormList getRegistrationTargetFormsForUpdate(IdList registrationTargetIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration target forms for updating an existing set of registration targets. A new registration target form should be requested for each update transaction.- Parameters:
registrationTargetIds- theIdsof theRegistrationTargets- Returns:
- the registration target forms
- Throws:
NotFoundException- aregistrationTargetIdis not foundNullArgumentException-registrationTargetIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateRegistrationTargets
UpdateResponseList updateRegistrationTargets(RegistrationTargetBatchFormList registrationTargetForms) throws OperationFailedException, PermissionDeniedException Updates existing registration targets. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
registrationTargetForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-registrationTargetFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllRegistrationTargets
DeleteResponseList deleteAllRegistrationTargets() throws OperationFailedException, PermissionDeniedExceptionDeletes allRegistrationTargetsin thisCourseCatalog.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteRegistrationTargets
DeleteResponseList deleteRegistrationTargets(IdList registrationTargetIds) throws OperationFailedException, PermissionDeniedException Deletes registration targets for the givenIds.- Parameters:
registrationTargetIds- theIdsof the registration targets to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-registrationTargetIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteRegistrationTargetsForCourseOffering
DeleteResponseList deleteRegistrationTargetsForCourseOffering(Id courseOfferingId) throws OperationFailedException, PermissionDeniedException Deletes registration targets for the given course offering.- Parameters:
courseOfferingId- theIdof a course offering- Returns:
- the delete responses
- Throws:
NullArgumentException-courseOfferingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteRegistrationTargetsByActivityOffering
DeleteResponseList deleteRegistrationTargetsByActivityOffering(Id activityOfferingId) throws OperationFailedException, PermissionDeniedException Deletes registration targets containing the given activity offering.- Parameters:
activityOfferingId- theIdof an activity offering- Returns:
- the delete responses
- Throws:
NullArgumentException-activityOfferingIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasRegistrationTargets
AliasResponseList aliasRegistrationTargets(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aRegistrationTargetfor the purpose of creating compatibility. The primaryIdof theRegistrationTargetis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another registration target, it is reassigned to the given registration targetId.- 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.
-