public abstract class AppCacheUpdater extends AbstractApplicationObject<ApplicationContext>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cacheSubDir |
static java.lang.String |
logSubDir |
static java.lang.String |
timestampFileName |
Modifier | Constructor and Description |
---|---|
protected |
AppCacheUpdater(ApplicationContext ctx,
LogChannel logCh,
java.io.File appCacheRoot) |
Modifier and Type | Method and Description |
---|---|
protected java.io.File |
buildTimestampFile(java.lang.String relativePath) |
protected void |
copyStream(FileDataType dataType,
java.io.InputStream inStream,
java.io.OutputStream outStream) |
protected void |
createDirectoryPathFor(java.io.File file) |
java.io.File |
getAppCacheDir()
Returns the software subdirectory of the local cache which is <cacheRootDir>/appCache;
|
java.io.File |
getAppCacheRoot()
Returns the root directory of the local cache.
|
java.io.File |
getAppLogsDir()
Returns the software subdirectory of the local cache which is <cacheRootDir>/appLogs;
|
protected java.io.FileFilter |
getExcludeFilter() |
void |
init() |
boolean |
isEnabled() |
protected boolean |
isInstallationSourceAvailable()
Tells whether the repository (which may reside on a remote server) is currently available.
|
abstract 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.
|
abstract 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.
|
protected void |
performExtraction(AbstractAsyncTask installTask,
java.io.InputStream inStream,
FileInfo fileInfo,
java.io.File targetDir,
java.lang.String repository,
java.io.File timestampFile,
long timestamp) |
void |
setEnabled(boolean isEnabled) |
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString
public static final java.lang.String timestampFileName
public static final java.lang.String cacheSubDir
public static final java.lang.String logSubDir
protected AppCacheUpdater(ApplicationContext ctx, LogChannel logCh, java.io.File appCacheRoot)
public void setEnabled(boolean isEnabled)
public boolean isEnabled()
protected java.io.File buildTimestampFile(java.lang.String relativePath)
protected java.io.FileFilter getExcludeFilter()
public void init() throws java.lang.Exception
java.lang.Exception
public abstract boolean mirrorConfigFile(java.lang.String relativePath, java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
public abstract boolean mirrorZipContent(AbstractAsyncTask installTask, java.lang.String relativePath, java.lang.String fileName) throws java.lang.Exception
installTask
- java.lang.Exception
protected boolean isInstallationSourceAvailable()
public final java.io.File getAppCacheRoot()
public final java.io.File getAppCacheDir()
public final java.io.File getAppLogsDir()
protected void createDirectoryPathFor(java.io.File file) throws java.lang.Exception
java.lang.Exception
protected final void copyStream(FileDataType dataType, java.io.InputStream inStream, java.io.OutputStream outStream) throws java.io.IOException
java.io.IOException
protected void performExtraction(AbstractAsyncTask installTask, java.io.InputStream inStream, FileInfo fileInfo, java.io.File targetDir, java.lang.String repository, java.io.File timestampFile, long timestamp) throws java.lang.Exception
java.lang.Exception
Copyright © 2014 EsprIT-Systems. All Rights Reserved.