public interface CatalogueBatchAdminSession extends CatalogueAdminSession
This session creates, updates, and deletes Catalogues
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
Catalogue,
a CatalogueForm
is requested using
getCatalogueFormsForCreate()
specifying the desired record
Types
or none if no record Types
are needed.
Each of the returned CatalogueForms
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 CatalogueForm
is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
CatalogueForm
corresponds to an attempted transaction.
The CatalogueForms
returned from
getCatalogueFormsForCreate()
may be linked to the originating
request through the peer Ids
of the CatalogueForm.
In the case where there may be duplicates, any
CatalogueForm
of the same peer Ids
may be used for
a create operation.
Once a batch of CatalogueForms
are submitted for
create, a CreateResponse
is returned for each
CatalogueForm,
although the ordering is not defined. Only errors
that pertain to the entire create operation are returned from
createCatalogues(),
errors specific to an individual
CatalogueForm
are indicated in the corresponding
CreateResponse.
CreateResponses
may be linked to
the originating CatalogueForm
through the
CatalogueForm
Id
.
For updates, CatalogueForms
are requested to the
Catalogue
Id
that is to be updated using
getCatalogueFormsForUpdate()
where the reference Id
in the CatalogueForm
may be used to link the request.
Similarly, the CatalogueForm
has metadata about the data
that can be updated and it can perform validation before submitting the
update. The CatalogueForm
can only be used once for a
successful update and cannot be reused.
Once a batch of CatalogueForms
are submitted for
update, an UpdateResponse
is returned for each
CatalogueForm,
although the ordering is not defined. Only errors
that pertain to the entire update operation are returned from
updateCatalogues(),
errors specific to an individual
CatalogueForm
are indicated in the corresponding
UpdateResponse.
UpdateResponses
may be linked to
the originating CatalogueForm
through the
CatalogueForm
Id.
The delete operations delete Catalogues
in bulk. To
unmap a Catalogue
from the current Calendar,
the CatalogueCalendarAssignmentSession
should be used.
These delete operations attempt to remove the Catalogue
itself thus removing it from all known Calendar
catalogs.
Bulk delete operations return the results in DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasCatalogues(AliasRequestList aliasRequests)
Adds an
Id to a Catalogue for the
purpose of creating compatibility. |
CreateResponseList |
createCatalogues(CatalogueBatchFormList catalogueForms)
Creates a new set of
Catalogues. |
DeleteResponseList |
deleteAllCatalogues()
Deletes all
Catalogues in this Calendar
. |
DeleteResponseList |
deleteCatalogues(IdList catalogueIds)
Deletes catalogues for the given
Ids. |
CatalogueBatchFormList |
getCatalogueFormsForCreate(long number,
Type[] catalogueRecordTypes)
Gets the catalogue forms for creating a bunch of new catalogues.
|
CatalogueBatchFormList |
getCatalogueFormsForUpdate(IdList catalogueIds)
Gets the catalogue forms for updating an existing set of catalogues.
|
UpdateResponseList |
updateCatalogues(CatalogueBatchFormList catalogueForms)
Updates existing catalogues.
|
aliasCatalogue, canCreateCatalogues, canCreateCatalogueWithRecordTypes, canDeleteCatalogues, canManageCatalogueAliases, canUpdateCatalogues, createCatalogue, deleteCatalogue, getCatalogueFormForCreate, getCatalogueFormForUpdate, updateCatalogue
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
CatalogueBatchFormList getCatalogueFormsForCreate(long number, Type[] catalogueRecordTypes) throws OperationFailedException, PermissionDeniedException
number
- the number of forms to retrievecatalogueRecordTypes
- array of catalogue record types to be
included in each create operation or an empty list if noneNullArgumentException
- catalogueRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createCatalogues(CatalogueBatchFormList catalogueForms) throws OperationFailedException, PermissionDeniedException
Catalogues.
This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse
.catalogueForms
- the catalogue formsNullArgumentException
- catalogueForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CatalogueBatchFormList getCatalogueFormsForUpdate(IdList catalogueIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
catalogueIds
- the Ids
of the Catalogue
NotFoundException
- a catalogueId
is not
foundNullArgumentException
- catalogueIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateCatalogues(CatalogueBatchFormList catalogueForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.catalogueForms
- the form containing the elements to be updatedNullArgumentException
- catalogueForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllCatalogues() throws OperationFailedException, PermissionDeniedException
Catalogues
in this Calendar
.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteCatalogues(IdList catalogueIds) throws OperationFailedException, PermissionDeniedException
Ids.
catalogueIds
- the Ids
of the catalogues to
deleteNullArgumentException
- catalogueIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasCatalogues(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to a Catalogue
for the
purpose of creating compatibility. The primary Id
of
the Catalogue
is determined by the provider. The new
Id
is an alias to the primary Id.
If the
alias is a pointer to another catalogue, it is reassigned to the given
catalogue Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.