Interface IdiomBatchAdminSession

All Superinterfaces:
AutoCloseable, Closeable, IdiomAdminSession, OsidSession, OsidSession

public interface IdiomBatchAdminSession extends IdiomAdminSession

This session creates, updates, and deletes Idioms 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 an Idiom , an IdiomForm is requested using getIdiomFormsForCreate() specifying the desired texts and record Types or none if no record Typ es are needed. Each of the retur ned IdiomForms 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 an IdiomForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each IdiomForm corresponds to an attempted transac tion .

The Idiom Forms returned from getIdiomFormsForCreate() may be linked to the originating request through the peer Ids of the IdiomForm . In the case where there may be duplicates, a ny IdiomForm of the same peer Ids may be used for a create operation.

Once a batch of IdiomForms are submitted for create, a CreateResponse is returned for each IdiomForm , although the ordering is not defined. Only errors that pertain to the entire create operation are returned from createIdioms() , errors specific to an individual IdiomForm are indicated in the corresponding CreateResponse . CreateResponses may be linked to the originating IdiomForm through the IdiomForm Id .

For updates, IdiomForms are re quested to the Idiom I d that is to be updated using getIdiomFormsForUpdate() where the reference Id in the IdiomForm may be used to link the request. Similarly, the IdiomForm has metadata about the data that can be updated and it can perform validation before submitting the update. The IdiomForm can only be used once for a successful update and cannot be reused.

Once a batch of IdiomForms are submitted for update, an Up dateResponse is returned for each IdiomForm , although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updateIdioms() , errors specific to an individual IdiomForm are indicated in the corresponding UpdateResponse . Up dateResponses may be linked to the originating IdiomForm through the IdiomForm Id .

The delete operations delete Idio ms in bulk. To unmap an Idiom from the current Press , the IdiomPressAssignmentSession should be used. These delete operations attempt to remove the Idiom itself thus removing it from all known Press catalogs. Bulk delete operations return the results in DeleteResponses .