Class ScriptItemRefresher
java.lang.Object
org.openhab.core.model.script.jvmmodel.ScriptItemRefresher
- All Implemented Interfaces:
RegistryChangeListener<Item>
,ItemRegistryChangeListener
The
ScriptItemRefresher
is responsible for reloading script resources every time an item is added or removed.- Author:
- Oliver Libutzki - Initial contribution, Kai Kreuzer - added delayed execution
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addActionService
(ActionService actionService) void
Notifies the listener that a single element has been added.void
allItemsChanged
(Collection<String> oldItemNames) Notifies the listener that all items in the registry have changed and thus should be reloaded.protected void
removeActionService
(ActionService actionService) void
Notifies the listener that a single element has been removed.void
setItemRegistry
(ItemRegistry itemRegistry) void
setModelRepository
(ModelRepository modelRepository) void
unsetItemRegistry
(ItemRegistry itemRegistry) void
unsetModelRepository
(ModelRepository modelRepository) void
Notifies the listener that a single element has been updated.
-
Constructor Details
-
ScriptItemRefresher
public ScriptItemRefresher()
-
-
Method Details
-
setModelRepository
-
unsetModelRepository
-
setItemRegistry
-
unsetItemRegistry
-
addActionService
-
removeActionService
-
added
Description copied from interface:RegistryChangeListener
Notifies the listener that a single element has been added.- Specified by:
added
in interfaceRegistryChangeListener<Item>
- Parameters:
element
- the element that has been added
-
removed
Description copied from interface:RegistryChangeListener
Notifies the listener that a single element has been removed.- Specified by:
removed
in interfaceRegistryChangeListener<Item>
- Parameters:
element
- the element that has been removed
-
updated
Description copied from interface:RegistryChangeListener
Notifies the listener that a single element has been updated.- Specified by:
updated
in interfaceRegistryChangeListener<Item>
- Parameters:
oldElement
- the element that has been updatedelement
- the new element
-
allItemsChanged
Description copied from interface:ItemRegistryChangeListener
Notifies the listener that all items in the registry have changed and thus should be reloaded.- Specified by:
allItemsChanged
in interfaceItemRegistryChangeListener
- Parameters:
oldItemNames
- a collection of all previous item names, so that references can be removed
-