Interface Trigger
- All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject, 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
.
-
Method Summary
Modifier and TypeMethodDescriptionTests if this trigger listens to events where the variable amount or percentage decreased to the same or below this value.booleanTests if this trigger listens to controller state changes.Tests if this trigger listens to events where the variable amount or percentage increased to the same or above this value.booleanTests if this trigger listens to controller events where a state has changed to a specific state.booleanTests if this trigger listens to changed variable amount controller events.Gets theActionGroupIdsto execute in this trigger.Gets theActionGroupsto execute in this trigger.Gets the controller.Gets the controllerId.Gets the discreetStatefor a changed state event.Gets the discreetStateIdfor a changed state event.Gets theSceneIdsto execute in this trigger.Gets theScenesto execute in this trigger.Gets theSettingIdsto execute in this trigger.Gets theSettingsto execute in this trigger.getTriggerRecord(Type triggerRecordType) Gets the trigger record corresponding to the givenTriggerrecordType.This method is used to retrieve an object implementing the requested record.booleanTests if this trigger listens to controller OFF events.booleanturnedOn()Tests if this trigger listens to controller ON events.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface Operable
isActive, isDisabled, isEnabled, isOperationalModifier and TypeMethodDescriptionbooleanisActive()Tests if this operable is active.booleanTests if this operable is administravely disabled.booleanTests if this operable is administravely enabled.booleanTests if thisOperableis operational.Methods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.Methods inherited from interface OsidRule
getConditionRecordTypes, getRule, getRuleId, hasRule
-
Method Details
-
getControllerId
Id getControllerId()Gets the controllerId.- Returns:
- the controller
Id - Compliance:
mandatory- This method must be implemented.
-
getController
Gets the controller.- Returns:
- the controller
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
turnedOn
boolean turnedOn()Tests if this trigger listens to controller ON events.- Returns:
trueif this is an ON event listener,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
turnedOff
boolean turnedOff()Tests if this trigger listens to controller OFF events.- Returns:
trueif this is an OFF event listener,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
changedVariableAmount
boolean changedVariableAmount()Tests if this trigger listens to changed variable amount controller events.- Returns:
trueif this is a change event listener,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
changedExceedsVariableAmount
BigDecimal changedExceedsVariableAmount()Tests if this trigger listens to events where the variable amount or percentage increased to the same or above this value.- Returns:
- the max threshold
- Compliance:
mandatory- This method must be implemented.
-
changedDeceedsVariableAmount
BigDecimal changedDeceedsVariableAmount()Tests if this trigger listens to events where the variable amount or percentage decreased to the same or below this value.- Returns:
- the max threshold
- Compliance:
mandatory- This method must be implemented.
-
changedDiscreetState
boolean changedDiscreetState()Tests if this trigger listens to controller state changes.- Returns:
trueif this is a state change event listener,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
changedToDiscreetState
boolean changedToDiscreetState()Tests if this trigger listens to controller events where a state has changed to a specific state.- Returns:
trueif this is a state change event,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getDiscreetStateId
Id getDiscreetStateId()Gets the discreetStateIdfor a changed state event.- Returns:
- the state
Id - Throws:
IllegalStateException-changedToDiscreetState()isfalse- Compliance:
mandatory- This method must be implemented.
-
getDiscreetState
Gets the discreetStatefor a changed state event.- Returns:
- the state
- Throws:
IllegalStateException-changedToDiscreetState()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getActionGroupIds
IdList getActionGroupIds()Gets theActionGroupIdsto execute in this trigger. Multiple action groups can be executed in the order of this list.- Returns:
- the action group
Ids - Compliance:
mandatory- This method must be implemented.
-
getActionGroups
Gets theActionGroupsto execute in this trigger. Multiple action groups can be executed in the order of this list.- Returns:
- the action group
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getSceneIds
IdList getSceneIds()Gets theSceneIdsto execute in this trigger. Multiple scenes can be executed in the order of this list. This is a shortcut to definingActionsandActionGroupswhich offer more control in scene execution.- Returns:
- the scene
Ids - Compliance:
mandatory- This method must be implemented.
-
getScenes
Gets theScenesto execute in this trigger. Multiple scenes can be executed in the order of this list. This is a shortcut to definingActionsandActionGroupswhich offer more control in scene execution.- Returns:
- the action group
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getSettingIds
IdList getSettingIds()Gets theSettingIdsto execute in this trigger. Multiple settings can be executed in the order of this list. This is a shortcut to definingSettings,ActionsandActionGroupswhich offer more control in scene and setting execution.- Returns:
- the setting
Ids - Compliance:
mandatory- This method must be implemented.
-
getSettings
Gets theSettingsto execute in this trigger. Multiple settings can be executed in the order of this list. This is a shortcut to definingSettings,ActionsandActionGroupswhich offer more control in scene and setting execution.- Returns:
- the action group
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getTriggerRecord
Gets the trigger record corresponding to the givenTriggerrecordType.This method is used to retrieve an object implementing the requested record. ThetriggerRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(triggerRecordType)istrue.- Parameters:
triggerRecordType- the type of trigger record to retrieve- Returns:
- the trigger record
- Throws:
NullArgumentException-triggerRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(triggerRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-