public interface Trigger extends OsidRule, Subjugateable
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.
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
changedDeceedsVariableAmount()
Tests if this trigger listens to events where the variable amount or
percentage decreased to the same or below this value.
|
boolean |
changedDiscreetState()
Tests if this trigger listens to controller state changes.
|
java.math.BigDecimal |
changedExceedsVariableAmount()
Tests if this trigger listens to events where the variable amount or
percentage increased to the same or above this value.
|
boolean |
changedToDiscreetState()
Tests if this trigger listens to controller events where a state has
changed to a specific state.
|
boolean |
changedVariableAmount()
Tests if this trigger listens to changed variable amount controller
events.
|
IdList |
getActionGroupIds()
Gets the
ActionGroup Ids to execute in
this trigger. |
ActionGroupList |
getActionGroups()
Gets the
ActionGroups to execute in this trigger. |
Controller |
getController()
Gets the controller.
|
Id |
getControllerId()
Gets the controller
Id. |
State |
getDiscreetState()
Gets the discreet
State for a changed state event. |
Id |
getDiscreetStateId()
Gets the discreet
State Id for a changed
state event. |
IdList |
getSceneIds()
Gets the
Scene Ids to execute in this
trigger. |
SceneList |
getScenes()
Gets the
Scenes to execute in this trigger. |
IdList |
getSettingIds()
Gets the
Setting Ids to execute in this
trigger. |
SettingList |
getSettings()
Gets the
Settings to execute in this trigger. |
TriggerRecord |
getTriggerRecord(Type triggerRecordType)
Gets the trigger record corresponding to the given
Trigger
record Type. |
boolean |
turnedOff()
Tests if this trigger listens to controller OFF events.
|
boolean |
turnedOn()
Tests if this trigger listens to controller ON events.
|
getDescription, getDisplayName, getGenusType, isOfGenusType
getId, isCurrent
getRecordTypes, hasRecordType
getProperties, getPropertiesByRecordType
isActive, isDisabled, isEnabled, isOperational
Id getControllerId()
Id.
Id
mandatory
- This method must be implemented. Controller getController() throws OperationFailedException
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. boolean turnedOn()
true
if this is an ON event listener,
false
otherwisemandatory
- This method must be implemented. boolean turnedOff()
true
if this is an OFF event listener,
false
otherwisemandatory
- This method must be implemented. boolean changedVariableAmount()
true
if this is a change event listener,
false
otherwisemandatory
- This method must be implemented. java.math.BigDecimal changedExceedsVariableAmount()
mandatory
- This method must be implemented. java.math.BigDecimal changedDeceedsVariableAmount()
mandatory
- This method must be implemented. boolean changedDiscreetState()
true
if this is a state change event listener,
false
otherwisemandatory
- This method must be implemented. boolean changedToDiscreetState()
true
if this is a state change event,
false
otherwisemandatory
- This method must be implemented. Id getDiscreetStateId()
State
Id
for a changed
state event. Id
IllegalStateException
- changedToDiscreetState()
is false
mandatory
- This method must be implemented. State getDiscreetState() throws OperationFailedException
State
for a changed state event.IllegalStateException
- changedToDiscreetState()
is false
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getActionGroupIds()
ActionGroup
Ids
to execute in
this trigger. Multiple action groups can be executed in the order of
this list. Ids
mandatory
- This method must be implemented. ActionGroupList getActionGroups() throws OperationFailedException
ActionGroups
to execute in this trigger.
Multiple action groups can be executed in the order of this list.OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getSceneIds()
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. Ids
mandatory
- This method must be implemented. SceneList getScenes() throws OperationFailedException
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.OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getSettingIds()
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. Ids
mandatory
- This method must be implemented. SettingList getSettings() throws OperationFailedException
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.OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. TriggerRecord getTriggerRecord(Type triggerRecordType) throws OperationFailedException
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
.triggerRecordType
- the type of trigger record to retrieveNullArgumentException
- triggerRecordType
is null
OperationFailedException
- unable to complete requestUnsupportedException
-
hasRecordType(triggerRecordType)
is false
mandatory
- This method must be implemented.