OSID Logo
OSID Specifications
control batch package
Version 3.0.0
Release Candidate Preview
Interfaceosid.control.batch.InputBatchAdminSession
Implementsosid.control.InputAdminSession
Description

This session creates, updates, and deletes Inputs 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 Input, an InputForm is requested using getInputFormsForCreate() specifying the desired device, controller, and record Types or none if no record Types are needed. Each of the returned InputForms 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 InputForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each InputForm corresponds to an attempted transaction.

The InputForms returned from getInputFormsForCreate() may be linked to the originating request through the peer Ids of the InputForm. In the case where there may be duplicates, any InputForm of the same peer Ids may be used for a create operation.

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

For updates, InputForms are requested to the Input Id that is to be updated using getInputFormsForUpdate() where the reference Id in the InputForm may be used to link the request. Similarly, the InputForm has metadata about the data that can be updated and it can perform validation before submitting the update. The InputForm can only be used once for a successful update and cannot be reused.

Once a batch of InputForms are submitted for update, an UpdateInput is returned for each InputForm, although the ordering is not defined. Only errors that pertain to the entire update operation are returned from updateInputs(), errors specific to an individual InputForm are indicated in the corresponding UpdateInput. UpdateInputs may be linked to the originating InputForm through the InputForm Id.

The delete operations delete Inputs in bulk. To unmap an Input from the current System, the InputSystemAssignmentSession should be used. These delete operations attempt to remove the Input itself thus removing it from all known System catalogs. Bulk delete operations return the results in DeleteInputs.

MethodgetInputFormsForCreate
Description

Gets the input forms for creating a bunch of new inputs. A form is retrieved for each device and controller pair.

Parametersosid.control.batch.InputPeerListpeerslist of device controller peers
osid.type.Type[]inputRecordTypesarray of input record types to be included in each create operation or an empty list if none
Returnosid.control.batch.InputBatchFormListthe input forms
ErrorsNOT_FOUNDa deviceId or controllerId is not found
NULL_ARGUMENT peers or inputRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to request forms with given record types
CompliancemandatoryThis method must be implemented.
MethodcreateInputs
Description

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

Parametersosid.control.batch.InputBatchFormListinputFormsthe input forms
Returnosid.transaction.batch.CreateResponseListthe create responses
ErrorsNULL_ARGUMENT inputForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetInputFormsForUpdate
Description

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

Parametersosid.id.IdListinputIdsthe Ids of the Input
Returnosid.control.batch.InputBatchFormListthe input form
ErrorsNOT_FOUNDan inputId is not found
NULL_ARGUMENT inputIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateInputs
Description

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

Parametersosid.control.batch.InputBatchFormListinputFormsthe form containing the elements to be updated
Returnosid.transaction.batch.UpdateResponseListthe update responses
ErrorsNULL_ARGUMENT inputForms is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteAllInputs
Description

Deletes all Inputs in this System.

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

Deletes inputs for the given Ids.

Parametersosid.id.IdListinputIdsthe Ids of the inputs to delete
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT inputIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteInputsForDevice
Description

Deletes inputs for the given Device.

Parametersosid.id.IddeviceIda deviceId Id
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT deviceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteInputsForController
Description

Deletes inputs for the given Controller.

Parametersosid.id.IdcontrollerIda controller Id
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT controllerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethoddeleteIneffectiveInputsByDate
Description

Deletes inputs expired before the given date.

Parametersosid.calendaring.DateTimedatea date
Returnosid.transaction.batch.DeleteResponseListthe delete responses
ErrorsNULL_ARGUMENT date is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaliasInputs
Description

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

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