Class ScriptProfile
java.lang.Object
org.openhab.core.automation.module.script.profile.ScriptProfile
- All Implemented Interfaces:
Profile
,StateProfile
,TimeSeriesProfile
The
ScriptProfile
is generic profile for managing values with scripts- Author:
- Jan N. Klug - Initial contribution
-
Field Summary
-
Constructor Summary
ConstructorDescriptionScriptProfile
(ProfileTypeUID profileTypeUID, ProfileCallback callback, ProfileContext profileContext, TransformationService transformationService) -
Method Summary
Modifier and TypeMethodDescriptionGet theProfileTypeUID
of this profile.void
onCommandFromHandler
(Command command) If a binding issued a command to a channel, this method will be called for each linked item.void
onCommandFromItem
(Command command) Will be called if a command should be forwarded to the binding.void
onStateUpdateFromHandler
(State state) If the binding indicated a state update on a channel, then this method will be called for each linked item.void
onStateUpdateFromItem
(State state) Will be called if an item has changed its state and this information should be forwarded to the binding.void
onTimeSeriesFromHandler
(TimeSeries timeSeries) If a binding sends a time-series to a channel, this method will be called for each linked item.
-
Field Details
-
CONFIG_TO_ITEM_SCRIPT
- See Also:
-
CONFIG_TO_HANDLER_SCRIPT
- See Also:
-
CONFIG_COMMAND_FROM_ITEM_SCRIPT
- See Also:
-
CONFIG_STATE_FROM_ITEM_SCRIPT
- See Also:
-
-
Constructor Details
-
ScriptProfile
public ScriptProfile(ProfileTypeUID profileTypeUID, ProfileCallback callback, ProfileContext profileContext, TransformationService transformationService)
-
-
Method Details
-
getProfileTypeUID
Description copied from interface:Profile
Get theProfileTypeUID
of this profile.- Specified by:
getProfileTypeUID
in interfaceProfile
- Returns:
- the UID of the profile type
-
onStateUpdateFromItem
Description copied from interface:Profile
Will be called if an item has changed its state and this information should be forwarded to the binding.- Specified by:
onStateUpdateFromItem
in interfaceProfile
- Parameters:
state
- the new state
-
onCommandFromItem
Description copied from interface:StateProfile
Will be called if a command should be forwarded to the binding.- Specified by:
onCommandFromItem
in interfaceStateProfile
-
onCommandFromHandler
Description copied from interface:StateProfile
If a binding issued a command to a channel, this method will be called for each linked item.- Specified by:
onCommandFromHandler
in interfaceStateProfile
-
onStateUpdateFromHandler
Description copied from interface:StateProfile
If the binding indicated a state update on a channel, then this method will be called for each linked item.- Specified by:
onStateUpdateFromHandler
in interfaceStateProfile
-
onTimeSeriesFromHandler
Description copied from interface:TimeSeriesProfile
If a binding sends a time-series to a channel, this method will be called for each linked item.- Specified by:
onTimeSeriesFromHandler
in interfaceTimeSeriesProfile
- Parameters:
timeSeries
- the time-series
-