Package com.zfabrik.impl.hubcr

## Class ComponentRepositoryImpl

- java.lang.Object
- - com.zfabrik.components.provider.util.AbstractExtComponentRepository<com.zfabrik.components.provider.util.FSCRDBComponent,​DB>
  - - com.zfabrik.components.provider.util.AbstractComponentRepository<com.zfabrik.hubcr.RemoteComponentRepositoryDB>
    - - com.zfabrik.impl.hubcr.ComponentRepositoryImpl

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

      public class ComponentRepositoryImpl
      extends com.zfabrik.components.provider.util.AbstractComponentRepository<com.zfabrik.hubcr.RemoteComponentRepositoryDB>

  A remote repository hub component repository. This repository connects to a Z2 hosted remote repository that provides optimized repository content in the sense that no local compilation is required anymore and that no source code will be transmitted over the wire. Typically the hub repository is the only one used aside from the local pre-built core repository.

  Component properties that have a meaning:

  `hubcr.url` | The URL to the source repo. Typically this is of the form http://<server>:<port>/z_hubcr
  `hubcr.timeout` | Connection timeout in ms for connecting to the providing side (defaults to 10000)
  `hubcr.user` | The remote user to use (optional but required by default)
  `hubcr.password` | The remote user's password
  `hubcr.priority` | The priority of the repository (defaults to 500)

  In addition there is a system property `com.zfabrik.hubcr.mode` that if set to `relaxed` (as opposed to the default of `strict`) supports relaxed behavior if remote database updates do not succeed. If relaxed, the repository will continue with the latest known database. Assuming component resources have been fetched previously, this allows to survive short outages gracefully.
  Author:
    hb

- - ### 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
    --- | ---
    `ComponentRepositoryImpl​(java.lang.String name, java.util.Properties properties)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `download​(com.zfabrik.components.provider.util.FSCRDBComponent component, java.io.File folder)` | Download resources of a single component into the given folder
    `com.zfabrik.hubcr.RemoteComponentRepositoryDB` | `scan​(com.zfabrik.hubcr.RemoteComponentRepositoryDB current)` | Provide an updated DB.
    `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

    - #### ComponentRepositoryImpl

          public ComponentRepositoryImpl​(java.lang.String name,
                                         java.util.Properties properties)

  - ### Method Detail

    - #### download

          public void download​(com.zfabrik.components.provider.util.FSCRDBComponent component,
                               java.io.File folder)

      Description copied from class: `com.zfabrik.components.provider.util.AbstractExtComponentRepository`
      Download resources of a single component into the given folder
      Specified by:
        `download` in class `com.zfabrik.components.provider.util.AbstractExtComponentRepository<com.zfabrik.components.provider.util.FSCRDBComponent,​com.zfabrik.hubcr.RemoteComponentRepositoryDB>`

    - #### scan

          public com.zfabrik.hubcr.RemoteComponentRepositoryDB scan​(com.zfabrik.hubcr.RemoteComponentRepositoryDB current)

      Description copied from class: `com.zfabrik.components.provider.util.AbstractExtComponentRepository`
      Provide an updated DB. This DB will be used to compute invalidations on synchronization and it will be used to serve component meta-data. If the repository implementation needs to attach additional meta-data to the DB, it should overwrite the DB class to do so, as the result of a scan potentially will be discarded.
      Specified by:
        `scan` in class `com.zfabrik.components.provider.util.AbstractExtComponentRepository<com.zfabrik.components.provider.util.FSCRDBComponent,​com.zfabrik.hubcr.RemoteComponentRepositoryDB>`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `com.zfabrik.components.provider.util.AbstractExtComponentRepository<com.zfabrik.components.provider.util.FSCRDBComponent,​com.zfabrik.hubcr.RemoteComponentRepositoryDB>`