Package org.jumpmind.symmetric
Class AbstractCommandLauncher
java.lang.Object
org.jumpmind.symmetric.AbstractCommandLauncher
- Direct Known Subclasses:
DbCompareCommand
,DbExportCommand
,DbFillCommand
,DbImportCommand
,DbSqlCommand
,JmxCommand
,SymmetricAdmin
,SymmetricLauncher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected static final String
static final String
protected ISymmetricEngine
protected static final String
protected String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected IDatabasePlatform
protected File
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractCommandLauncher
(String app, String argSyntax, String messageKeyPrefix) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCommonOption
(org.apache.commons.cli.Options options, String opt, boolean hasArg) protected void
addCommonOption
(org.apache.commons.cli.Options options, String opt, String longOpt, boolean hasArg) protected void
protected void
protected void
buildCryptoOptions
(org.apache.commons.cli.Options options) protected void
buildOptions
(org.apache.commons.cli.Options options) protected void
configureCrypto
(org.apache.commons.cli.CommandLine line) protected void
configureLogging
(org.apache.commons.cli.CommandLine line) protected void
configurePropertiesFile
(org.apache.commons.cli.CommandLine line) void
protected abstract boolean
executeWithOptions
(org.apache.commons.cli.CommandLine line) protected IDatabasePlatform
getDatabasePlatform
(boolean testConnection) protected IDatabasePlatform
getDatabasePlatform
(boolean testConnection, boolean symmetricPlatform) protected ISymmetricEngine
protected ISymmetricEngine
getSymmetricEngine
(boolean testConnection) protected TypedProperties
protected static void
protected void
printHelp
(org.apache.commons.cli.CommandLine cmd, org.apache.commons.cli.Options options) protected abstract boolean
protected void
printUsage
(org.apache.commons.cli.Options options) protected abstract boolean
requiresPropertiesFile
(org.apache.commons.cli.CommandLine line) protected String
scrubCommandLine
(String[] cmdArgs) protected String
scrubOptionValues
(org.apache.commons.cli.Option option) protected void
-
Field Details
-
DEFAULT_SERVER_PROPERTIES
-
HELP
- See Also:
-
OPTION_PROPERTIES_FILE
- See Also:
-
OPTION_ENGINE
- See Also:
-
OPTION_VERBOSE_CONSOLE
- See Also:
-
OPTION_DEBUG
- See Also:
-
OPTION_NO_LOG_CONSOLE
- See Also:
-
OPTION_NO_LOG_FILE
- See Also:
-
OPTION_KEYSTORE_PASSWORD
- See Also:
-
OPTION_KEYSTORE_TYPE
- See Also:
-
OPTION_JCE_PROVIDER
- See Also:
-
COMMON_MESSAGE_KEY_PREFIX
- See Also:
-
app
-
argSyntax
-
messageKeyPrefix
-
propertiesFile
-
engine
-
platform
-
-
Constructor Details
-
AbstractCommandLauncher
-
-
Method Details
-
initFromServerProperties
protected static void initFromServerProperties() -
printHelpIfNoOptionsAreProvided
protected abstract boolean printHelpIfNoOptionsAreProvided() -
requiresPropertiesFile
protected abstract boolean requiresPropertiesFile(org.apache.commons.cli.CommandLine line) -
execute
-
scrubCommandLine
-
scrubOptionValues
-
printHelp
protected void printHelp(org.apache.commons.cli.CommandLine cmd, org.apache.commons.cli.Options options) -
printUsage
protected void printUsage(org.apache.commons.cli.Options options) -
configureLogging
protected void configureLogging(org.apache.commons.cli.CommandLine line) throws MalformedURLException - Throws:
MalformedURLException
-
configurePropertiesFile
protected void configurePropertiesFile(org.apache.commons.cli.CommandLine line) throws org.apache.commons.cli.ParseException - Throws:
org.apache.commons.cli.ParseException
-
findSingleEnginesPropertiesFile
-
configureCrypto
- Throws:
Exception
-
getSymmetricEngine
-
getSymmetricEngine
-
testConnection
protected void testConnection() -
getDatabasePlatform
-
getDatabasePlatform
-
getTypedProperties
-
buildOptions
protected void buildOptions(org.apache.commons.cli.Options options) -
buildCryptoOptions
protected void buildCryptoOptions(org.apache.commons.cli.Options options) -
addOption
-
addOption
-
addCommonOption
-
addCommonOption
-
executeWithOptions
protected abstract boolean executeWithOptions(org.apache.commons.cli.CommandLine line) throws Exception - Throws:
Exception
-