public interface RealmBatchAdminSession extends RealmAdminSession
This session creates, updates, and deletes Realms 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
Realm, a RealmForm is requested using
getRealmFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each
of the returned RealmForms 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 RealmForm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
RealmForm corresponds to an attempted transaction.
The RealmForms returned from
getRealmFormsForCreate() may be linked to the originating request
through the peer Ids of the RealmForm. In
the case where there may be duplicates, any RealmForm of
the same peer Ids may be used for a create operation.
Once a batch of RealmForms are submitted for create, a
CreateResponse is returned for each RealmForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from createRealms(),
errors specific to an individual RealmForm are
indicated in the corresponding CreateResponse.
CreateResponses may be linked to the originating RealmForm
through the RealmForm Id .
For updates, RealmForms are requested to the
Realm Id that is to be updated using
getRealmFormsForUpdate() where the reference Id in
the RealmForm may be used to link the request. Similarly,
the RealmForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
RealmForm can only be used once for a successful update and
cannot be reused.
Once a batch of RealmForms are submitted for update, an
UpdateResponse is returned for each RealmForm,
although the ordering is not defined. Only errors that pertain to
the entire update operation are returned from updateRealms(),
errors specific to an individual RealmForm are
indicated in the corresponding UpdateResponse.
UpdateResponses may be linked to the originating RealmForm
through the RealmForm Id.
The delete operations delete Realms in bulk. Bulk
delete operations return the results in DeleteResponses.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasRealms(AliasRequestList aliasRequests)
Adds an
Id to a Realm for the purpose of
creating compatibility. |
CreateResponseList |
createRealms(RealmBatchFormList realmForms)
Creates a new set of
Realms. |
DeleteResponseList |
deleteAllRealms()
Deletes all
Realms. |
DeleteResponseList |
deleteRealms(IdList realmIds)
Deletes realms for the given
Ids. |
RealmBatchFormList |
getRealmFormsForCreate(long number,
Type[] realmRecordTypes)
Gets the realm forms for creating a bunch of new realms.
|
RealmBatchFormList |
getRealmFormsForUpdate(IdList realmIds)
Gets the realm forms for updating an existing set of realms.
|
UpdateResponseList |
updateRealms(RealmBatchFormList realmForms)
Updates existing realms.
|
aliasRealm, canCreateRealms, canCreateRealmWithRecordTypes, canDeleteRealms, canManageRealmAliases, canUpdateRealms, createRealm, deleteRealm, getRealmFormForCreate, getRealmFormForUpdate, updateRealmgetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseRealmBatchFormList getRealmFormsForCreate(long number, Type[] realmRecordTypes) throws OperationFailedException, PermissionDeniedException
number - the number of forms to retrieverealmRecordTypes - array of realm record types to be included in
each create operation or an empty list if noneNullArgumentException - realmRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList createRealms(RealmBatchFormList realmForms) throws OperationFailedException, PermissionDeniedException
Realms. This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse .realmForms - the realm formsNullArgumentException - realmForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. RealmBatchFormList getRealmFormsForUpdate(IdList realmIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
realmIds - the Ids of the Realm NotFoundException - a realmId is not
foundNullArgumentException - realmIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. UpdateResponseList updateRealms(RealmBatchFormList realmForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse .realmForms - the form containing the elements to be updatedNullArgumentException - realmForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllRealms() throws OperationFailedException, PermissionDeniedException
Realms. OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteRealms(IdList realmIds) throws OperationFailedException, PermissionDeniedException
Ids. realmIds - the Ids of the realms to deleteNullArgumentException - realmIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasRealms(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id to a Realm for the purpose of
creating compatibility. The primary Id of the
Realm is determined by the provider. The new Id
is an alias to the primary Id. If the alias is a
pointer to another realm, it is reassigned to the given realm
Id. aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.