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

This session creates, updates, and deletes Inputs. 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 Input, a InputForm is requested using getInputFormForCreate() specifying the desired device, controller, and record Types or none if no record Types are needed. The returned InputForm 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 the 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.

For updates, InputForms are requested to the Input Id that is to be updated using getInputFormForUpdate(). 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.

The delete operations delete Inputs. To unmap a 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.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetSystemId
Description

Gets the System Id associated with this session.

Returnosid.id.Idthe System Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetSystem
Description

Gets the System associated with this session.

Returnosid.control.Systemthe system
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateInputs
Description

Tests if this user can create Inputs. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Input will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Input creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateInputWithRecordTypes
Description

Tests if this user can create a single Input using the desired record types. While ControlManager.getInputRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Input. Providing an empty array tests if a Input can be created with no records.

Parametersosid.type.Type[]inputRecordTypesarray of input record types
Returnboolean true if Input creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT inputRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetInputFormForCreate
Description

Gets the input form for creating new inputs. A new form should be requested for each create transaction.

Parametersosid.id.IddeviceIda device Id
osid.id.IdcontrollerIda controller Id
osid.type.Type[]inputRecordTypesarray of input record types
Returnosid.control.InputFormthe input form
ErrorsNOT_FOUND deviceId or controllerId is not found
NULL_ARGUMENT deviceId, controllerId, or inputRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateInput
Description

Creates a new Input.

Parametersosid.control.InputForminputFormthe form for this Input
Returnosid.control.Inputthe new Input
ErrorsILLEGAL_STATE inputForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT inputForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED inputForm did not originate from getInputFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateInputs
Description

Tests if this user can update Inputs. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Input will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Input modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetInputFormForUpdate
Description

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

Parametersosid.id.IdinputIdthe Id of the Input
Returnosid.control.InputFormthe input form
ErrorsNOT_FOUND inputId is not found
NULL_ARGUMENT inputId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateInput
Description

Updates an existing input.

Parametersosid.control.InputForminputFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE inputForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT inputForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED inputForm did not originate from getInputFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteInputs
Description

Tests if this user can delete Inputs. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Input will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Input deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteInput
Description

Deletes a Input.

Parametersosid.id.IdinputIdthe Id of the Input to remove
ErrorsNOT_FOUND inputId not found
NULL_ARGUMENT inputId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageInputAliases
Description

Tests if this user can manage Id aliases for Inputs. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Input aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasInput
Description

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

Parametersosid.id.IdinputIdthe Id of a Input
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND inputId not found
NULL_ARGUMENT inputId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.