Package com.zfabrik.components.provider.fs

## Class AbstractFileSystemComponentRepository

- java.lang.Object
- - com.zfabrik.components.provider.util.AbstractExtComponentRepository<RootBoundFSCRComponent,​MultiRootFSComponentRepositoryDB>
  - - com.zfabrik.components.provider.fs.AbstractFileSystemComponentRepository

- All Implemented Interfaces:
    `com.zfabrik.components.provider.IComponentsRepository`, `com.zfabrik.util.sync.ISynchronizer`

      public class AbstractFileSystemComponentRepository
      extends com.zfabrik.components.provider.util.AbstractExtComponentRepository<RootBoundFSCRComponent,​MultiRootFSComponentRepositoryDB>

  An abstract component repository implementation over a file system style storage. The defining characteristics is that there is no simpler way to determine some last modified information than a scan for last modified time stamps (up to some depths) over the repository and that scanning is acceptably fast.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.zfabrik.components.provider.util.AbstractExtComponentRepository

      `com.zfabrik.components.provider.util.AbstractExtComponentRepository.Repo, com.zfabrik.components.provider.util.AbstractExtComponentRepository.RepoMBean`

  - ### Field Summary

    - ### Fields inherited from class com.zfabrik.components.provider.util.AbstractExtComponentRepository

      `ALL`

    - ### Fields inherited from interface com.zfabrik.components.provider.IComponentsRepository

      `COMPONENT_REPO_IMPLEMENTATION, COMPONENT_REPO_MODE, COMPONENT_REPO_MODE_RELAXED, COMPONENT_REPO_MODE_STRICT`

    - ### Fields inherited from interface com.zfabrik.util.sync.ISynchronizer

      `PRIO, TYPE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractFileSystemComponentRepository​(java.lang.String name, int prio)` |
    `AbstractFileSystemComponentRepository​(java.lang.String name, int prio, int checkDepth)` |
    `AbstractFileSystemComponentRepository​(java.lang.String name, int prio, int checkDepth, boolean autoConfigure)` | Constructor leaving a choice whether the repo completes configuration in the constructor (defaults to true with the other constructors).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `download​(RootBoundFSCRComponent c, java.io.File folder)` | Provide all resources for a component into a given folder
    `java.util.Map<java.lang.String,​? extends IAbstractFileSystem>` | `getRoots()` |
    `MultiRootFSComponentRepositoryDB` | `scan​(MultiRootFSComponentRepositoryDB current)` | The FSCR is scanning at startup always completely.
    `void` | `setRoots​(java.util.Map<java.lang.String,​? extends IAbstractFileSystem> roots)` | Set roots within repo.
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class com.zfabrik.components.provider.util.AbstractExtComponentRepository

      `as, checkOfflineMode, complete, configure, configure, configure, findComponents, getCacheRoot, getComponent, getContext, getDB, getExpectedConfiguration, getModules, getName, getRevision, getRevision, getURL, has, isRelaxedMode, preInvalidation, preInvalidation, retrieve, setEvictionDelay, start, stop, test_setContext, test_setDb, test_setInited`

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

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

    - ### Methods inherited from interface com.zfabrik.components.provider.IComponentsRepository

      `findComponents, getComponent, getModules, getRevision, retrieve`

- - ### Constructor Detail

    - #### AbstractFileSystemComponentRepository

          public AbstractFileSystemComponentRepository​(java.lang.String name,
                                                       int prio,
                                                       int checkDepth)

    - #### AbstractFileSystemComponentRepository

          public AbstractFileSystemComponentRepository​(java.lang.String name,
                                                       int prio,
                                                       int checkDepth,
                                                       boolean autoConfigure)

      Constructor leaving a choice whether the repo completes configuration in the constructor (defaults to true with the other constructors). If not chosen, the `AbstractExtComponentRepository.configure(int)` method needs to be called explicitely before going into service. This may be useful if `AbstractExtComponentRepository.getExpectedConfiguration()` is used with non-default values or other configuration is changed.

    - #### AbstractFileSystemComponentRepository

          public AbstractFileSystemComponentRepository​(java.lang.String name,
                                                       int prio)

  - ### Method Detail

    - #### getRoots

          public java.util.Map<java.lang.String,​? extends IAbstractFileSystem> getRoots()

    - #### setRoots

          public void setRoots​(java.util.Map<java.lang.String,​? extends IAbstractFileSystem> roots)

      Set roots within repo. Roots must be configured before first scan. Roots are pathes within the file system based repo without leading slash and always relative to the repository root folder.

    - #### scan

          public MultiRootFSComponentRepositoryDB scan​(MultiRootFSComponentRepositoryDB current)

      The FSCR is scanning at startup always completely. Therefore we really don't care so much about the DB in terms of caching. But the DB will be used by workers nevertheless.
      Specified by:
        `scan` in class `com.zfabrik.components.provider.util.AbstractExtComponentRepository<RootBoundFSCRComponent,​MultiRootFSComponentRepositoryDB>`

    - #### download

          public void download​(RootBoundFSCRComponent c,
                               java.io.File folder)

      Provide all resources for a component into a given folder
      Specified by:
        `download` in class `com.zfabrik.components.provider.util.AbstractExtComponentRepository<RootBoundFSCRComponent,​MultiRootFSComponentRepositoryDB>`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `com.zfabrik.components.provider.util.AbstractExtComponentRepository<RootBoundFSCRComponent,​MultiRootFSComponentRepositoryDB>`