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

This session creates and removes device enablers. The data for create and update is provided via the DeviceEnablerForm.

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.
MethodcanCreateDeviceEnabler
Description

Tests if this user can create device enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a DeviceEnabler 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 DeviceEnabler creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateDeviceEnablerWithRecordTypes
Description

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

Parametersosid.type.Type[]deviceEnablerRecordTypesarray of device enabler record types
Returnboolean true if DeviceEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT deviceEnablerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDeviceEnablerFormForCreate
Description

Gets the device enabler form for creating new device enablers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]deviceEnablerRecordTypesarray of device enabler record types
Returnosid.control.rules.DeviceEnablerFormthe device enabler form
ErrorsNULL_ARGUMENT deviceEnablerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDeviceEnabler
Description

Creates a new DeviceEnabler.

Parametersosid.control.rules.DeviceEnablerFormdeviceEnablerFormthe form for this DeviceEnabler
Returnosid.control.rules.DeviceEnablerthe new DeviceEnabler
ErrorsILLEGAL_STATE deviceEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT deviceEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED deviceEnablerForm did not originate from getDeviceEnablerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDeviceEnablers
Description

Tests if this user can update device enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a DeviceEnabler 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 DeviceEnabler modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDeviceEnablerFormForUpdate
Description

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

Parametersosid.id.IddeviceEnablerIdthe Id of the DeviceEnabler
Returnosid.control.rules.DeviceEnablerFormthe device enabler form
ErrorsNOT_FOUND deviceEnablerId is not found
NULL_ARGUMENT deviceEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDeviceEnabler
Description

Updates an existing device enabler.

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

Tests if this user can delete device enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a DeviceEnabler 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 DeviceEnabler deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteDeviceEnabler
Description

Deletes a DeviceEnabler.

Parametersosid.id.IddeviceEnablerIdthe Id of the DeviceEnabler to remove
ErrorsNOT_FOUND deviceEnablerId not found
NULL_ARGUMENT deviceEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDeviceEnablerAliases
Description

Tests if this user can manage Id aliases for device enablers. 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 DeviceEnabler aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasDeviceEnabler
Description

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

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