OSID Logo
OSID Specifications
lexicon batch package
Version 3.0.0
Interfaceosid.lexicon.batch.IdiomBatchAdminSession
Implementsosid.lexicon.IdiomAdminSession
Used Byosid.lexicon.batch.LexiconBatchManager
osid.lexicon.batch.LexiconBatchProxyManager
Description

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 .

MethodgetIdiomFormsForCreate
Description

Gets the idioms forms for creating a bunch of new idioms. A new form is returned for each supplied text Id .

Parametersosid.id.IdListtextIdsa list of text Ids
osid.type.Type[]IdiomRecordTypesarray of idiom record types to be included in each create operation or an empty list if none
Returnosid.lexicon.batch.IdiomBatchFormListthe idiom forms
ErrorsNOT_FOUNDa textId is not found
NULL_ARGUMENTtextIds or IdiomRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateIdioms
Description

Creates a new set of Idioms . This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse .

Parametersosid.lexicon.batch.IdiomBatchFormListIdiomFormsthe idiom forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENTIdiomForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetIdiomFormsForUpdate
Description

Gets the idiom forms for updating an existing set of idioms. A new idiom form should be requested for each update transaction.

Parametersosid.id.IdListIdiomIdsthe Ids of the Idiom
Returnosid.lexicon.batch.IdiomBatchFormListthe idiom form
ErrorsNOT_FOUNDan IdiomId is not found
NULL_ARGUMENTIdiomIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateIdioms
Description

Updates existing idioms. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in the BatchCreateResponse .

Parametersosid.lexicon.batch.IdiomBatchFormListIdiomFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENTIdiomForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllIdioms
Description

Deletes all Idioms in this Press .

Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteIdioms
Description

Deletes idioms for the given Ids .

Parametersosid.id.IdListIdiomIdsthe Ids of the idioms to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENTIdiomIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasIdioms
Description

Adds an Id to an Idiom for the purpose of creating compatibility. The primary Id of the Idiom is determined by the provider. The new Id is an alias to the primary Id . If the alias is a pointer to another idiom, it is reassigned to the given idiom Id .

Parametersosid.transaction.batch.AliasRequestListaliasRequeststhe alias requests
Returnosid.transaction.batch.AliasResponseListthe alias responses
ErrorsNULL_ARGUMENTaliasRequests is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.