Interface ConvocationBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, ConvocationAdminSession, OsidSession, OsidSession
This session creates, updates, and deletes Convocations 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
Convocation , a ConvocationForm is requested using
getConvocationFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each of the returned
ConvocationForms 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 ConvocationForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each ConvocationForm corresponds
to an attempted transaction.
The ConvocationForms returned from
getConvocationFormsForCreate() may be linked to the originating request
through the peer Ids of the ConvocationForm . In the case
where there may be duplicates, any ConvocationForm of the same
peer Ids may be used for a create operation.
Once a batch of ConvocationForms are submitted for create, a
CreateResponse is returned for each ConvocationForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createConvocations() ,
errors specific to an individual ConvocationForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating ConvocationForm through the
ConvocationForm Id .
For updates, ConvocationForms are requested to the
Convocation Id that is to be updated using
getConvocationFormsForUpdate() where the reference Id in the
ConvocationForm may be used to link the request. Similarly, the
ConvocationForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
ConvocationForm can only be used once for a successful update and cannot
be reused.
Once a batch of ConvocationForms are submitted for update, an
UpdateResponse is returned for each ConvocationForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateConvocations() ,
errors specific to an individual ConvocationForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating ConvocationForm through the
ConvocationForm Id .
The delete operations delete Convocations in bulk. To unmap a
Convocation from the current Academy , the
ConvocationAcademyAssignmentSession should be used. These delete
operations attempt to remove the Convocation itself thus removing
it from all known Academy catalogs. Bulk delete operations return
the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasConvocations(AliasRequestList aliasRequests) Adds anIdto aConvocationfor the purpose of creating compatibility.createConvocations(ConvocationBatchFormList convocationForms) Creates a new set ofConvocations.Deletes allConvocationsin thisAcademy.deleteConvocations(IdList convocationIds) Deletes convocations for the givenIds.getConvocationFormsForCreate(long number, Type[] convocationRecordTypes) Gets the convocation forms for creating a bunch of new convocations.getConvocationFormsForUpdate(IdList convocationIds) Gets the convocation forms for updating an existing set of convocations.updateConvocations(ConvocationBatchFormList convocationForms) Updates existing convocations.Methods inherited from interface ConvocationAdminSession
aliasConvocation, canCreateConvocations, canCreateConvocationWithRecordTypes, canDeleteConvocations, canManageConvocationAliases, canUpdateConvocations, createConvocation, deleteConvocation, getAcademy, getAcademyId, getConvocationFormForCreate, getConvocationFormForUpdate, updateConvocationModifier and TypeMethodDescriptionvoidaliasConvocation(Id convocationId, Id aliasId) Adds anIdto aConvocationfor the purpose of creating compatibility.booleanTests if this user can create convocations.booleancanCreateConvocationWithRecordTypes(Type[] convocationRecordTypes) Tests if this user can create a singleConvocationusing the desired record types.booleanTests if this user can delete convocations.booleanTests if this user can manageIdaliases forConvocations.booleanTests if this user can update convocations.createConvocation(ConvocationForm convocationForm) Creates a newConvocation.voiddeleteConvocation(Id convocationId) Deletes aConvocation.Gets theAcademyassociated with this session.Gets theAcademyIdassociated with this session.getConvocationFormForCreate(Type[] convocationRecordTypes) Gets the convocation form for creating new convocations.getConvocationFormForUpdate(Id convocationId) Gets the convocation form for updating an existing convocation.voidupdateConvocation(ConvocationForm convocationForm) Updates an existing convocation.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.
-
Method Details
-
getConvocationFormsForCreate
ConvocationBatchFormList getConvocationFormsForCreate(long number, Type[] convocationRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the convocation forms for creating a bunch of new convocations.- Parameters:
number- the number of forms to retrieveconvocationRecordTypes- array of convocation record types to be included in each create operation or an empty list if none- Returns:
- the convocation forms
- Throws:
NullArgumentException-convocationRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createConvocations
CreateResponseList createConvocations(ConvocationBatchFormList convocationForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofConvocations. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
convocationForms- the convocation forms- Returns:
- the create responses
- Throws:
NullArgumentException-convocationFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConvocationFormsForUpdate
ConvocationBatchFormList getConvocationFormsForUpdate(IdList convocationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the convocation forms for updating an existing set of convocations. A new convocation form should be requested for each update transaction.- Parameters:
convocationIds- theIdsof theConvocation- Returns:
- the convocation form
- Throws:
NotFoundException- aconvocationIdis not foundNullArgumentException-convocationIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateConvocations
UpdateResponseList updateConvocations(ConvocationBatchFormList convocationForms) throws OperationFailedException, PermissionDeniedException Updates existing convocations. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
convocationForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-convocationFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllConvocations
DeleteResponseList deleteAllConvocations() throws OperationFailedException, PermissionDeniedExceptionDeletes allConvocationsin thisAcademy.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteConvocations
DeleteResponseList deleteConvocations(IdList convocationIds) throws OperationFailedException, PermissionDeniedException Deletes convocations for the givenIds.- Parameters:
convocationIds- theIdsof the convocations to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-convocationIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasConvocations
AliasResponseList aliasConvocations(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aConvocationfor the purpose of creating compatibility. The primaryIdof theConvocationis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another convocation, it is reassigned to the given convocationId.- 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.
-