public class SyncToolConfigParser extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
BACKUP_FILE_NAME |
protected static String |
context |
protected static int |
DEFAULT_MAX_FILE_SIZE |
protected static int |
DEFAULT_NUM_THREADS |
protected static long |
DEFAULT_POLL_FREQUENCY |
protected static int |
DEFAULT_PORT |
protected static long |
GIGABYTE |
protected static String |
PREV_BACKUP_FILE_NAME |
Constructor and Description |
---|
SyncToolConfigParser()
Creates a parser for command line configuration options.
|
Modifier and Type | Method and Description |
---|---|
protected void |
backupConfig(File backupDir,
String[] args) |
protected ConsolePrompt |
getConsole() |
protected String |
getPasswordEnvVariable() |
SyncToolConfig |
processCommandLine(String[] args)
Parses command line configuration into an object structure, validates
correct values along the way.
|
protected SyncToolConfig |
processConfigFileOptions(String[] args) |
protected SyncToolConfig |
processStandardOptions(String[] args) |
protected SyncToolConfig |
processStandardOptions(String[] args,
boolean requirePassword) |
protected String[] |
retrieveConfig(File configBackupFile) |
SyncToolConfig |
retrievePrevConfig(File backupDir)
Retrieves the configuration of the previous run of the Sync Tool.
|
protected static final long GIGABYTE
protected static final String BACKUP_FILE_NAME
protected static final String PREV_BACKUP_FILE_NAME
protected static final int DEFAULT_PORT
protected static final long DEFAULT_POLL_FREQUENCY
protected static final int DEFAULT_NUM_THREADS
protected static final int DEFAULT_MAX_FILE_SIZE
protected static final String context
public SyncToolConfigParser()
public SyncToolConfig processCommandLine(String[] args)
args
- command line configuration valuesprotected SyncToolConfig processConfigFileOptions(String[] args) throws org.apache.commons.cli.ParseException
org.apache.commons.cli.ParseException
protected SyncToolConfig processStandardOptions(String[] args) throws org.apache.commons.cli.ParseException
org.apache.commons.cli.ParseException
protected SyncToolConfig processStandardOptions(String[] args, boolean requirePassword) throws org.apache.commons.cli.ParseException
org.apache.commons.cli.ParseException
public SyncToolConfig retrievePrevConfig(File backupDir)
backupDir
- the current backup directoryprotected String getPasswordEnvVariable()
protected ConsolePrompt getConsole()
Copyright © 2009–2014 DuraSpace. All rights reserved.