de.esprit.appsuite.nio.watcher

## Class LocalPathTreeModelDriver<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.nio.watcher.PathTreeModelDriver<C>
      - - de.esprit.appsuite.nio.watcher.LocalPathTreeModelDriver<C>

- All Implemented Interfaces:
    ApplicationObject<C>, PathChangeEvent.Source, PathRegistrationEvent.Source, SimpleLogSupport, Dumpable, Resettable
  Direct Known Subclasses:
    GuiPathTreeModelDriver, ServerPathTreeModelDriver

      public class LocalPathTreeModelDriver<C extends ApplicationContext>
      extends PathTreeModelDriver<C>

  This `PathTreeModelDriver` implementation runs a `PathWatcher` that observes registered paths in the local file-system. This class ensures that change events are dispatched within the event dispatcher thread. Therefore this class can directly drive a GUI component such as a `PathTreeModel`.
  Author:
    Rainer Buesch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected PathWatcher` | `watcher`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalPathTreeModelDriver(C ctx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected PathInfo` | `createPathInfo(PathInfo parentInfo, java.nio.file.Path path)`
    `BranchPathFilter` | `getPathFilter()`
    `PathWatcher` | `getPathWatcher()`
    `boolean` | `isWatchServiceRunning()`
    `java.util.List<PathInfo>` | `loadChildren(PathInfo parentInfo)`
    `void` | `renamePath(java.nio.file.Path oldPath, java.nio.file.Path newPath)`
    `void` | `reset()` This method is called by the ResetButton on it's registered target.
    `void` | `setPathFilter(PathFilter filter)`
    `protected void` | `setPermissionFilter(PathFilter filter)`
    `void` | `startWatchService()`
    `void` | `stopWatchService()`

    - ### Methods inherited from class de.esprit.appsuite.nio.watcher.PathTreeModelDriver

      `addPathChangeListener, addPathRegistrationListener, firePathChangeEvent, firePathRegistrationEvent, removePathChangeListener, removePathRegistrationListener`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### watcher

          protected final PathWatcher watcher

  - ### Constructor Detail

    - #### LocalPathTreeModelDriver

          public LocalPathTreeModelDriver(C ctx)

  - ### Method Detail

    - #### getPathWatcher

          public PathWatcher getPathWatcher()

    - #### reset

          public void reset()

      Description copied from interface: `Resettable`
      This method is called by the ResetButton on it's registered target.

    - #### startWatchService

          public final void startWatchService()

    - #### stopWatchService

          public final void stopWatchService()

    - #### isWatchServiceRunning

          public final boolean isWatchServiceRunning()

    - #### getPathFilter

          public final BranchPathFilter getPathFilter()

      Specified by:
        `getPathFilter` in class `PathTreeModelDriver<C extends ApplicationContext>`

    - #### setPathFilter

          public final void setPathFilter(PathFilter filter)

      Specified by:
        `setPathFilter` in class `PathTreeModelDriver<C extends ApplicationContext>`

    - #### setPermissionFilter

          protected final void setPermissionFilter(PathFilter filter)

    - #### loadChildren

          public final java.util.List<PathInfo> loadChildren(PathInfo parentInfo)

      Specified by:
        `loadChildren` in class `PathTreeModelDriver<C extends ApplicationContext>`

    - #### createPathInfo

          protected PathInfo createPathInfo(PathInfo parentInfo,
                                java.nio.file.Path path)
                                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### renamePath

          public final void renamePath(java.nio.file.Path oldPath,
                        java.nio.file.Path newPath)
                                throws java.lang.Exception

      Specified by:
        `renamePath` in class `PathTreeModelDriver<C extends ApplicationContext>`
      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.