test_class.declarator: configDispatcherFileWatcher
test_class.modifier: private
test_class.original_string: private TestConfigDispatcherFileWatcher configDispatcherFileWatcher;
test_class.type: TestConfigDispatcherFileWatcher
test_class.var_name: configDispatcherFileWatcher
test_class.declarator: configDispatcher
test_class.modifier: private @Mock
test_class.original_string: private @Mock ConfigDispatcher configDispatcher;
test_class.type: ConfigDispatcher
test_class.var_name: configDispatcher
test_class.file: bundles/org.openhab.core.config.dispatch/src/test/java/org/openhab/core/config/dispatch/internal/ConfigDispatcherFileWatcherTest.java
test_class.identifier: ConfigDispatcherFileWatcherTest
test_case.body: @Test
      public void configurationFileModified() {
          String path = "myPath.cfg";
          configDispatcherFileWatcher.processWatchEvent(null, StandardWatchEventKinds.ENTRY_MODIFY,
                  new File(path).toPath());
  
          verify(configDispatcher).processConfigFile(new File(path));
      }
test_case.class_method_signature: ConfigDispatcherFileWatcherTest.configurationFileModified()
test_case.full_signature: @Test public void configurationFileModified()
test_case.identifier: configurationFileModified
test_case.invocations: processWatchEvent toPath processConfigFile verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void configurationFileModified()
focal_class.declarator: SERVICEDIR_PROG_ARGUMENT = "openhab.servicedir"
focal_class.modifier: public static final
focal_class.original_string: public static final String SERVICEDIR_PROG_ARGUMENT = "openhab.servicedir";
focal_class.type: String
focal_class.var_name: SERVICEDIR_PROG_ARGUMENT
focal_class.declarator: SERVICES_FOLDER = "services"
focal_class.modifier: public static final
focal_class.original_string: public static final String SERVICES_FOLDER = "services";
focal_class.type: String
focal_class.var_name: SERVICES_FOLDER
focal_class.declarator: configDispatcher
focal_class.modifier: private final
focal_class.original_string: private final ConfigDispatcher configDispatcher;
focal_class.type: ConfigDispatcher
focal_class.var_name: configDispatcher
focal_class.file: bundles/org.openhab.core.config.dispatch/src/main/java/org/openhab/core/config/dispatch/internal/ConfigDispatcherFileWatcher.java
focal_class.identifier: ConfigDispatcherFileWatcher
focal_class.class_method_signature: ConfigDispatcherFileWatcher.ConfigDispatcherFileWatcher(final @Reference ConfigDispatcher configDispatcher)
focal_class.full_signature: @Activate public  ConfigDispatcherFileWatcher(final @Reference ConfigDispatcher configDispatcher)
focal_class.identifier: ConfigDispatcherFileWatcher
focal_class.modifiers: @Activate public
focal_class.parameters: (final @Reference ConfigDispatcher configDispatcher)
focal_class.signature:  ConfigDispatcherFileWatcher(final @Reference ConfigDispatcher configDispatcher)
focal_class.class_method_signature: ConfigDispatcherFileWatcher.getPathToWatch()
focal_class.full_signature: private static String getPathToWatch()
focal_class.identifier: getPathToWatch
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPathToWatch()
focal_class.class_method_signature: ConfigDispatcherFileWatcher.activate()
focal_class.full_signature: @Activate @Override public void activate()
focal_class.identifier: activate
focal_class.modifiers: @Activate @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void activate()
focal_class.class_method_signature: ConfigDispatcherFileWatcher.deactivate()
focal_class.full_signature: @Deactivate @Override public void deactivate()
focal_class.identifier: deactivate
focal_class.modifiers: @Deactivate @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deactivate()
focal_class.class_method_signature: ConfigDispatcherFileWatcher.watchSubDirectories()
focal_class.full_signature: @Override protected boolean watchSubDirectories()
focal_class.identifier: watchSubDirectories
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean watchSubDirectories()
focal_class.class_method_signature: ConfigDispatcherFileWatcher.getWatchEventKinds(Path subDir)
focal_class.full_signature: @Override protected Kind<?>[] getWatchEventKinds(Path subDir)
focal_class.identifier: getWatchEventKinds
focal_class.modifiers: @Override protected
focal_class.parameters: (Path subDir)
focal_class.return: Kind<?>[]
focal_class.signature: Kind<?>[] getWatchEventKinds(Path subDir)
focal_class.class_method_signature: ConfigDispatcherFileWatcher.processWatchEvent(WatchEvent<?> event, Kind<?> kind, Path path)
focal_class.full_signature: @Override protected void processWatchEvent(WatchEvent<?> event, Kind<?> kind, Path path)
focal_class.identifier: processWatchEvent
focal_class.modifiers: @Override protected
focal_class.parameters: (WatchEvent<?> event, Kind<?> kind, Path path)
focal_class.return: void
focal_class.signature: void processWatchEvent(WatchEvent<?> event, Kind<?> kind, Path path)
focal_class.superclass: extends AbstractWatchService
focal_method.body: @Override
      protected void processWatchEvent(WatchEvent<?> event, Kind<?> kind, Path path) {
          if (kind == ENTRY_CREATE || kind == ENTRY_MODIFY) {
              File f = path.toFile();
              if (!f.isHidden() && f.getName().endsWith(".cfg")) {
                  configDispatcher.processConfigFile(f);
              }
          } else if (kind == ENTRY_DELETE) {
              // Detect if a service specific configuration file was removed. We want to
              // notify the service in this case with an updated empty configuration.
              File configFile = path.toFile();
              if (configFile.isHidden() || configFile.isDirectory() || !configFile.getName().endsWith(".cfg")) {
                  return;
              }
              configDispatcher.fileRemoved(configFile.getAbsolutePath());
          }
      }
focal_method.class_method_signature: ConfigDispatcherFileWatcher.processWatchEvent(WatchEvent<?> event, Kind<?> kind, Path path)
focal_method.full_signature: @Override protected void processWatchEvent(WatchEvent<?> event, Kind<?> kind, Path path)
focal_method.identifier: processWatchEvent
focal_method.invocations: toFile isHidden endsWith getName processConfigFile toFile isHidden isDirectory endsWith getName fileRemoved getAbsolutePath
focal_method.modifiers: @Override protected
focal_method.parameters: (WatchEvent<?> event, Kind<?> kind, Path path)
focal_method.return: void
focal_method.signature: void processWatchEvent(WatchEvent<?> event, Kind<?> kind, Path path)