public final class ConfigUpdater extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ConfigUpdater.DefaultListener
Outputs events to the console.
|
| Constructor and Description |
|---|
ConfigUpdater()
Default constructor.
|
ConfigUpdater(ConfigUpdaterListener listener)
Constructor with listener.
|
ConfigUpdater(File configFile)
Constructor with configuration file.
|
ConfigUpdater(File configFile,
ConfigUpdaterListener listener)
Constructor with configuration file and log printer.
|
| Modifier and Type | Method and Description |
|---|---|
Config |
getConfig()
Returns the configuration.
|
ConfigUpdaterListener |
getListener()
Returns the listener to inform about progress.
|
static void |
main(String[] args)
Creates a new configuration file or updates an existing one.
|
void |
update(File baseDir)
Clears the source file list in the configuration (!)
|
void |
update(List remoteFileList)
Clears the source file list in the configuration (!)
|
public ConfigUpdater()
public ConfigUpdater(ConfigUpdaterListener listener)
listener - Used for writing log messages - Cannot be null.public ConfigUpdater(File configFile) throws InvalidConfigException
configFile - Existing configuration file.InvalidConfigException - Error parsing an existing configuration.public ConfigUpdater(File configFile, ConfigUpdaterListener listener) throws InvalidConfigException
configFile - Existing configuration file.listener - Used for writing log messages.InvalidConfigException - Error parsing an existing configuration.public final void update(List remoteFileList) throws IOException
remoteFileList - List with RemoteFile objects.IOException - Error while copying.public final void update(File baseDir) throws IOException
baseDir - Source directory to create a configuration for.IOException - Error while copying.public final Config getConfig()
public final ConfigUpdaterListener getListener()
null.public static void main(String[] args) throws InvalidConfigException, IOException
args - First argument is the path and name of the configuration file.
Second argument is the directory to create the configuration
for.InvalidConfigException - Error parsing an existing configuration file.IOException - I/O-Error.Copyright © 2013 Future Invent Informationsmanagement GmbH, Hamburg (Germany). All Rights Reserved.