public interface InputBatchAdminSession extends InputAdminSession
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.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasInputs(AliasRequestList aliasRequests)
Adds an
Id to an Input for the purpose
of creating compatibility. |
CreateResponseList |
createInputs(InputBatchFormList inputForms)
Creates a new set of
Inputs. |
DeleteResponseList |
deleteAllInputs()
Deletes all
Inputs in this System. |
DeleteResponseList |
deleteIneffectiveInputsByDate(DateTime date)
Deletes inputs expired before the given date.
|
DeleteResponseList |
deleteInputs(IdList inputIds)
Deletes inputs for the given
Ids. |
DeleteResponseList |
deleteInputsForController(Id controllerId)
Deletes inputs for the given
Controller. |
DeleteResponseList |
deleteInputsForDevice(Id deviceId)
Deletes inputs for the given
Device. |
InputBatchFormList |
getInputFormsForCreate(InputPeerList peers,
Type[] inputRecordTypes)
Gets the input forms for creating a bunch of new inputs.
|
InputBatchFormList |
getInputFormsForUpdate(IdList inputIds)
Gets the input forms for updating an existing set of inputs.
|
UpdateResponseList |
updateInputs(InputBatchFormList inputForms)
Updates existing inputs.
|
aliasInput, canCreateInputs, canCreateInputWithRecordTypes, canDeleteInputs, canManageInputAliases, canUpdateInputs, createInput, deleteInput, getInputFormForCreate, getInputFormForUpdate, getSystem, getSystemId, updateInputgetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseInputBatchFormList getInputFormsForCreate(InputPeerList peers, Type[] inputRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers - list of device controller peersinputRecordTypes - array of input record types to be included in
each create operation or an empty list if noneNotFoundException - a deviceId or
controllerId is not foundNullArgumentException - peers or
inputRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList createInputs(InputBatchFormList inputForms) throws OperationFailedException, PermissionDeniedException
Inputs. This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateInput .inputForms - the input formsNullArgumentException - inputForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. InputBatchFormList getInputFormsForUpdate(IdList inputIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
inputIds - the Ids of the Input NotFoundException - an inputId is not
foundNullArgumentException - inputIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. UpdateResponseList updateInputs(InputBatchFormList inputForms) throws OperationFailedException, PermissionDeniedException
BatchCreateInput .inputForms - the form containing the elements to be updatedNullArgumentException - inputForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllInputs() throws OperationFailedException, PermissionDeniedException
Inputs in this System. OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteInputs(IdList inputIds) throws OperationFailedException, PermissionDeniedException
Ids. inputIds - the Ids of the inputs to deleteNullArgumentException - inputIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteInputsForDevice(Id deviceId) throws OperationFailedException, PermissionDeniedException
Device. deviceId - a deviceId Id NullArgumentException - deviceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteInputsForController(Id controllerId) throws OperationFailedException, PermissionDeniedException
Controller. controllerId - a controller Id NullArgumentException - controllerId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteIneffectiveInputsByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date - a dateNullArgumentException - date is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasInputs(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
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. aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.