Package mgui.datasources.util
Class DataSourceCommands
java.lang.Object
mgui.command.CommandInterpreter
mgui.command.CommandInstance
mgui.datasources.util.DataSourceCommands
public class DataSourceCommands extends CommandInstance
Utility for defining a JDBC driver with login and encrypted password.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.command.CommandInstance
current_processes, default_logging_type, exit_on_termination, instance_timer, is_interrupted, log_out, parameters
Fields inherited from class mgui.command.CommandInterpreter
clock_start, elapsed, instance_clock_start, instance_state, success_status
-
Constructor Summary
Constructors Constructor Description DataSourceCommands()
-
Method Summary
Modifier and Type Method Description boolean
define_jdbc_driver()
Defines a JDBC driver file (*.driver) with login and encrypted password.static void
main(java.lang.String[] args)
protected boolean
run_command(java.lang.String command)
Runs a single command with the current parameters.Methods inherited from class mgui.command.CommandInstance
execute, getCommandLine, interrupt, load_parameter_file, log, log, output_help, setSuccessStatus, start_log, stop_log
Methods inherited from class mgui.command.CommandInterpreter
getInstanceTimer, getParameters, getSuccessStatus, getTimer, isNumeric, startInstanceTimer, startTimer, stopInstanceTimer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DataSourceCommands
public DataSourceCommands()
-
-
Method Details
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Parameters:
args
-- Throws:
java.lang.Exception
-
run_command
protected boolean run_command(java.lang.String command)Description copied from class:CommandInstance
Runs a single command with the current parameters.- Specified by:
run_command
in classCommandInstance
-
define_jdbc_driver
public boolean define_jdbc_driver()Defines a JDBC driver file (*.driver) with login and encrypted password. If the file exists, it will be altered; otherwise it will be created.Parameters [required]
- file_name The file name of the driver; defines the file name as [file_name].driver
- login Login for the driver.
- password Plain text password for the driver.
Parameters [optional]
- driver_name The name of the driver; defaults to the file name for new files; otherwise keeps the old name.
- driver_url The JDBC-specific url specifying the location of the data source
- driver_class The full path to the mgui driver class. Defaults to 'mgui.datasources.DataSourceDriver' for new files; otherwise keeps the old class.
-