OSID Logo
OSID Specifications
control package
Version 3.0.0
Release Candidate Preview
Interfaceosid.control.Trigger
Implementsosid.OsidRule
osid.Subjugateable
Description

A Trigger is an OsidRule that listens to events from a Controller. The ActionGroups , Scenes and Settings are executed based on the event criteria of the Trigger.

MethodgetControllerId
Description

Gets the controller Id.

Returnosid.id.Idthe controller Id
CompliancemandatoryThis method must be implemented.
MethodgetController
Description

Gets the controller.

Returnosid.control.Controllerthe controller
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodturnedOn
Description

Tests if this trigger listens to controller ON events.

Returnboolean true if this is an ON event listener, false otherwise
CompliancemandatoryThis method must be implemented.
MethodturnedOff
Description

Tests if this trigger listens to controller OFF events.

Returnboolean true if this is an OFF event listener, false otherwise
CompliancemandatoryThis method must be implemented.
MethodchangedVariableAmount
Description

Tests if this trigger listens to changed variable amount controller events.

Returnboolean true if this is a change event listener, false otherwise
CompliancemandatoryThis method must be implemented.
MethodchangedExceedsVariableAmount
Description

Tests if this trigger listens to events where the variable amount or percentage increased to the same or above this value.

Returndecimalthe max threshold
CompliancemandatoryThis method must be implemented.
MethodchangedDeceedsVariableAmount
Description

Tests if this trigger listens to events where the variable amount or percentage decreased to the same or below this value.

Returndecimalthe max threshold
CompliancemandatoryThis method must be implemented.
MethodchangedDiscreetState
Description

Tests if this trigger listens to controller state changes.

Returnboolean true if this is a state change event listener, false otherwise
CompliancemandatoryThis method must be implemented.
MethodchangedToDiscreetState
Description

Tests if this trigger listens to controller events where a state has changed to a specific state.

Returnboolean true if this is a state change event, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDiscreetStateId
Description

Gets the discreet State Id for a changed state event.

Returnosid.id.Idthe state Id
ErrorsILLEGAL_STATE changedToDiscreetState() is false
CompliancemandatoryThis method must be implemented.
MethodgetDiscreetState
Description

Gets the discreet State for a changed state event.

Returnosid.process.Statethe state
ErrorsILLEGAL_STATE changedToDiscreetState() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetActionGroupIds
Description

Gets the ActionGroup Ids to execute in this trigger. Multiple action groups can be executed in the order of this list.

Returnosid.id.IdListthe action group Ids
CompliancemandatoryThis method must be implemented.
MethodgetActionGroups
Description

Gets the ActionGroups to execute in this trigger. Multiple action groups can be executed in the order of this list.

Returnosid.control.ActionGroupListthe action group
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetSceneIds
Description

Gets the Scene Ids to execute in this trigger. Multiple scenes can be executed in the order of this list. This is a shortcut to defining Actions and ActionGroups which offer more control in scene execution.

Returnosid.id.IdListthe scene Ids
CompliancemandatoryThis method must be implemented.
MethodgetScenes
Description

Gets the Scenes to execute in this trigger. Multiple scenes can be executed in the order of this list. This is a shortcut to defining Actions and ActionGroups which offer more control in scene execution.

Returnosid.control.SceneListthe action group
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetSettingIds
Description

Gets the Setting Ids to execute in this trigger. Multiple settings can be executed in the order of this list. This is a shortcut to defining Settings, Actions and ActionGroups which offer more control in scene and setting execution.

Returnosid.id.IdListthe setting Ids
CompliancemandatoryThis method must be implemented.
MethodgetSettings
Description

Gets the Settings to execute in this trigger. Multiple settings can be executed in the order of this list. This is a shortcut to defining Settings, Actions and ActionGroups which offer more control in scene and setting execution.

Returnosid.control.SettingListthe action group
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetTriggerRecord
Description

Gets the trigger record corresponding to the given Trigger record Type. This method is used to retrieve an object implementing the requested record. The triggerRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(triggerRecordType) is true .

Parametersosid.type.TypetriggerRecordTypethe type of trigger record to retrieve
Returnosid.control.records.TriggerRecordthe trigger record
ErrorsNULL_ARGUMENT triggerRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(triggerRecordType) is false
CompliancemandatoryThis method must be implemented.