de.esprit.appsuite.appstore

## Class AppCacheUrlUpdater

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<ApplicationContext>
    - - de.esprit.appsuite.appstore.AppCacheUpdater
      - - de.esprit.appsuite.appstore.AppCacheUrlUpdater

- All Implemented Interfaces:
    ApplicationObject<ApplicationContext>, SimpleLogSupport, Dumpable

      public class AppCacheUrlUpdater
      extends AppCacheUpdater

  This class mirrors remote files based on an URL-connection from an remote appStore repository to a local cache directory.
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class de.esprit.appsuite.appstore.AppCacheUpdater

      `cacheSubDir, logSubDir, timestampFileName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AppCacheUrlUpdater(ApplicationContext ctx, java.io.File appCacheRoot, java.net.URL appStoreUrl)`
    `AppCacheUrlUpdater(ApplicationContext ctx, LogChannel logCh, java.io.File appCacheRoot, java.net.URL appStoreUrl)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.URL` | `getAppStoreUrl()` Returns the root directory of the remote software repository.
    `protected boolean` | `isInstallationSourceAvailable()` Tells whether the repository (which may reside on a remote server) is currently available.
    `boolean` | `mirrorConfigFile(java.lang.String relativePath, java.lang.String fileName)` Mirrors the given file from a repository directory to a local cache directory The repositoryDir as well as the cacheDir are defined by the constructor of the implementing class.
    `boolean` | `mirrorZipContent(AbstractAsyncTask installTask, java.lang.String relativePath, java.lang.String fileName)` Extracts a ZIP-file containing an application software from the remote repository to the local cache directory.

    - ### Methods inherited from class de.esprit.appsuite.appstore.AppCacheUpdater

      `buildTimestampFile, copyStream, createDirectoryPathFor, getAppCacheDir, getAppCacheRoot, getAppLogsDir, getExcludeFilter, init, isEnabled, performExtraction, setEnabled`

    - ### 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`

- - ### Constructor Detail

    - #### AppCacheUrlUpdater

          public AppCacheUrlUpdater(ApplicationContext ctx,
                            java.io.File appCacheRoot,
                            java.net.URL appStoreUrl)

    - #### AppCacheUrlUpdater

          public AppCacheUrlUpdater(ApplicationContext ctx,
                            LogChannel logCh,
                            java.io.File appCacheRoot,
                            java.net.URL appStoreUrl)

  - ### Method Detail

    - #### getAppStoreUrl

          public java.net.URL getAppStoreUrl()

      Returns the root directory of the remote software repository.

    - #### mirrorConfigFile

          public final boolean mirrorConfigFile(java.lang.String relativePath,
                                 java.lang.String fileName)
                                         throws java.lang.Exception

      Description copied from class: `AppCacheUpdater`
      Mirrors the given file from a repository directory to a local cache directory The repositoryDir as well as the cacheDir are defined by the constructor of the implementing class.
      Specified by:
        `mirrorConfigFile` in class `AppCacheUpdater`
      Throws:
        `java.lang.Exception`

    - #### mirrorZipContent

          public boolean mirrorZipContent(AbstractAsyncTask installTask,
                                 java.lang.String relativePath,
                                 java.lang.String fileName)
                                   throws java.lang.Exception

      Description copied from class: `AppCacheUpdater`
      Extracts a ZIP-file containing an application software from the remote repository to the local cache directory. Note that after extraction a timestamp-file named AppLastInstalled.ndf is written to the installation directory. This file is used for up-to-date-checks on further launches.
      Specified by:
        `mirrorZipContent` in class `AppCacheUpdater`
      Throws:
        `java.lang.Exception`

    - #### isInstallationSourceAvailable

          protected final boolean isInstallationSourceAvailable()

      Description copied from class: `AppCacheUpdater`
      Tells whether the repository (which may reside on a remote server) is currently available.
      Overrides:
        `isInstallationSourceAvailable` in class `AppCacheUpdater`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.