Package org.openhab.core.transform
Class FileTransformationProvider
java.lang.Object
org.openhab.core.transform.FileTransformationProvider
- All Implemented Interfaces:
Provider<Transformation>
,WatchService.WatchEventListener
,TransformationProvider
@NonNullByDefault
public class FileTransformationProvider
extends Object
implements WatchService.WatchEventListener, TransformationProvider
The
FileTransformationProvider
implements a TransformationProvider
for
supporting transformations stored in configuration files- Author:
- Jan N. Klug - Initial contribution
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aProviderChangeListener
which must be notified if there are changes concerning the elements provided by theProvider
.void
getAll()
Returns a collection of all elements.void
processWatchEvent
(WatchService.Kind kind, Path path) Notify Listener about watch eventvoid
Removes aProviderChangeListener
.
-
Constructor Details
-
FileTransformationProvider
-
-
Method Details
-
deactivate
public void deactivate() -
addProviderChangeListener
Description copied from interface:Provider
Adds aProviderChangeListener
which must be notified if there are changes concerning the elements provided by theProvider
.- Specified by:
addProviderChangeListener
in interfaceProvider<Transformation>
- Parameters:
listener
- the listener to be added
-
removeProviderChangeListener
Description copied from interface:Provider
Removes aProviderChangeListener
.- Specified by:
removeProviderChangeListener
in interfaceProvider<Transformation>
- Parameters:
listener
- the listener to be removed.
-
getAll
Description copied from interface:Provider
Returns a collection of all elements.- Specified by:
getAll
in interfaceProvider<Transformation>
- Returns:
- collection of all elements
-
processWatchEvent
Description copied from interface:WatchService.WatchEventListener
Notify Listener about watch event- Specified by:
processWatchEvent
in interfaceWatchService.WatchEventListener
- Parameters:
kind
- theWatchService.Kind
of this eventpath
- the relative path of the file associated with this event
-