|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbmaintain.launch.commandline.CommandLine
public class CommandLine
Class that exposes a set of DbMaintain operations for command line execution.
Nested Class Summary | |
---|---|
static class |
CommandLine.DbMaintainOperation
Enum that defines all DbMaintain operations that can be invoked using this class. |
Field Summary | |
---|---|
static String |
DBMAINTAIN_PROPERTIES
|
Constructor Summary | |
---|---|
CommandLine()
|
Method Summary | |
---|---|
static void |
executeOperation(CommandLine.DbMaintainOperation operation,
Properties configuration,
CommandLineArguments commandLineArguments)
Executes the given operation using the given configuration. |
protected static CommandLine.DbMaintainOperation |
getDbMaintainOperation(CommandLineArguments commandLineArguments)
Gets the requested DbMaintain operation. |
protected static MainFactory |
getMainFactory(Properties configuration)
|
protected static URL |
getPropertiesAsURL(String fileName)
|
protected static Properties |
loadConfiguration(CommandLineArguments commandLineArguments)
Loads the configuration from custom config file or, if no custom config file was configured, from DBMAINTAIN_PROPERTIES , if this file exists. |
static void |
main(String[] args)
Executes a DbMaintain operation. |
protected static CommandLineArguments |
parseCommandLineArguments(String[] args)
Parses the command line arguments and gives back a CommandLineArguments instance that represents
these arguments in a more convenient way. |
static void |
printHelpMessage()
Prints out a help message that explains the usage of this class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DBMAINTAIN_PROPERTIES
Constructor Detail |
---|
public CommandLine()
Method Detail |
---|
public static void main(String[] args)
args
- The command line argumentsprotected static CommandLineArguments parseCommandLineArguments(String[] args)
CommandLineArguments
instance that represents
these arguments in a more convenient way.
args
- The command line arguments as an array of strings
CommandLineArguments
protected static CommandLine.DbMaintainOperation getDbMaintainOperation(CommandLineArguments commandLineArguments)
commandLineArguments
- The command line arguments
protected static Properties loadConfiguration(CommandLineArguments commandLineArguments)
DBMAINTAIN_PROPERTIES
, if this file exists. If a custom config file was configured and the config file
cannot be found, an error message is printed and execution is ended.
commandLineArguments
- The command line arguments
Properties
filepublic static void executeOperation(CommandLine.DbMaintainOperation operation, Properties configuration, CommandLineArguments commandLineArguments)
operation
- The operation that must be executedconfiguration
- The dbMaintain configurationcommandLineArguments
- The command line argumentsprotected static MainFactory getMainFactory(Properties configuration)
protected static URL getPropertiesAsURL(String fileName)
fileName
- The name of the file
public static void printHelpMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |