public interface ConvocationBatchAdminSession extends ConvocationAdminSession
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.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasConvocations(AliasRequestList aliasRequests)
Adds an
Id to a Convocation for the
purpose of creating compatibility. |
CreateResponseList |
createConvocations(ConvocationBatchFormList convocationForms)
Creates a new set of
Convocations. |
DeleteResponseList |
deleteAllConvocations()
Deletes all
Convocations in this Academy
. |
DeleteResponseList |
deleteConvocations(IdList convocationIds)
Deletes convocations for the given
Ids. |
ConvocationBatchFormList |
getConvocationFormsForCreate(long number,
Type[] convocationRecordTypes)
Gets the convocation forms for creating a bunch of new convocations.
|
ConvocationBatchFormList |
getConvocationFormsForUpdate(IdList convocationIds)
Gets the convocation forms for updating an existing set of
convocations.
|
UpdateResponseList |
updateConvocations(ConvocationBatchFormList convocationForms)
Updates existing convocations.
|
addAward, aliasConvocation, canCreateConvocations, canCreateConvocationWithRecordTypes, canDeleteConvocations, canManageConvocationAliases, canManageConvocations, canUpdateConvocations, createConvocation, deleteConvocation, getAcademy, getAcademyId, getConvocationFormForCreate, getConvocationFormForUpdate, removeAward, updateConvocationgetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseConvocationBatchFormList getConvocationFormsForCreate(long number, Type[] convocationRecordTypes) throws OperationFailedException, PermissionDeniedException
number - the number of forms to retrieveconvocationRecordTypes - array of convocation record types to be
included in each create operation or an empty list if noneNullArgumentException - convocationRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList createConvocations(ConvocationBatchFormList convocationForms) throws OperationFailedException, PermissionDeniedException
Convocations. This method returns
an error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse .convocationForms - the convocation formsNullArgumentException - convocationForms
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. ConvocationBatchFormList getConvocationFormsForUpdate(IdList convocationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
convocationIds - the Ids of the
Convocation NotFoundException - a convocationId is
not foundNullArgumentException - convocationIds
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. UpdateResponseList updateConvocations(ConvocationBatchFormList convocationForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse .convocationForms - the form containing the elements to be
updatedNullArgumentException - convocationForms
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllConvocations() throws OperationFailedException, PermissionDeniedException
Convocations in this Academy
.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteConvocations(IdList convocationIds) throws OperationFailedException, PermissionDeniedException
Ids. convocationIds - the Ids of the convocations to
deleteNullArgumentException - convocationIds
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasConvocations(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id to a Convocation for the
purpose of creating compatibility. The primary Id of
the Convocation is determined by the provider. The new
Id is an alias to the primary Id. If the
alias is a pointer to another convocation, it is reassigned to the
given convocation Id. aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.