|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.ddlscan.DDLScanCtrl
public class DDLScanCtrl
This class defines a DDLScanCtrl that implements a utility to access DDLScan methods. See the printHelp() command for a description of current commands.
| Field Summary | |
|---|---|
protected static ArgvIterator |
argvIterator
|
static java.lang.String |
DBNAME_VAR
Variable used in JDBC URL of Replicator's configuration file to designate current schema/database. |
protected static java.lang.String |
defaultConfigPath
Default path to replicator.properties if user not specified other. |
| Constructor Summary | |
|---|---|
DDLScanCtrl(java.lang.String url,
java.lang.String user,
java.lang.String pass,
java.lang.String db,
java.lang.String tables,
java.lang.String templateFile,
java.lang.String outFile,
java.lang.String renameDefinitions,
java.util.Hashtable<java.lang.String,java.lang.String> templateOptions,
java.lang.String additionalPath)
Creates a new DDLScanCtrl object from provided JDBC URL
connection credentials. |
|
| Method Summary | |
|---|---|
protected static void |
fail()
Exit with a process failure code. |
protected static void |
fatal(java.lang.String msg,
java.lang.Throwable t)
Abort following a fatal error. |
protected static boolean |
getBoolOrFalse(java.lang.Boolean bool)
Returns a value of a given Boolean object or false if the object is null. |
static java.lang.String |
lookForConfigFile()
Return the service configuration file if there is one and only one file that matches the static-svcname.properties pattern. |
static void |
main(java.lang.String[] argv)
Main method to run utility. |
void |
prepare()
|
protected static void |
print(java.lang.String msg)
Print a message to stdout without trailing new line character. |
protected static void |
printHelp()
|
protected static void |
println(java.lang.String msg)
Print a message to stdout with trailing new line character. |
static TungstenProperties |
readConfig(java.lang.String configFile)
Reads the replicator.properties. |
protected static boolean |
readYes()
Reads a character from stdin, blocks until it is not received. |
void |
release()
|
boolean |
scanAndGenerate()
Scans the database for requested objects and generates output through a template. |
static java.lang.String |
serviceFromConfigFileName(java.lang.String configFileName)
Parse out service name from static configuration file name. |
protected static void |
succeed()
Exit with a process success code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String defaultConfigPath
protected static ArgvIterator argvIterator
public static final java.lang.String DBNAME_VAR
| Constructor Detail |
|---|
public DDLScanCtrl(java.lang.String url,
java.lang.String user,
java.lang.String pass,
java.lang.String db,
java.lang.String tables,
java.lang.String templateFile,
java.lang.String outFile,
java.lang.String renameDefinitions,
java.util.Hashtable<java.lang.String,java.lang.String> templateOptions,
java.lang.String additionalPath)
throws java.lang.Exception
DDLScanCtrl object from provided JDBC URL
connection credentials.
url - JDBC URL connection string.
java.lang.Exception| Method Detail |
|---|
public void prepare()
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException
java.lang.InterruptedException
public boolean scanAndGenerate()
throws java.lang.InterruptedException,
ReplicatorException,
java.sql.SQLException,
java.io.IOException
java.lang.InterruptedException
ReplicatorException
java.sql.SQLException
java.io.IOExceptionpublic void release()
public static TungstenProperties readConfig(java.lang.String configFile)
throws java.lang.Exception
java.lang.Exceptionpublic static void main(java.lang.String[] argv)
argv - optional command stringpublic static java.lang.String lookForConfigFile()
public static java.lang.String serviceFromConfigFileName(java.lang.String configFileName)
configFileName - File name like "static-service.properties".
protected static void printHelp()
protected static void println(java.lang.String msg)
msg - protected static void print(java.lang.String msg)
msg -
protected static void fatal(java.lang.String msg,
java.lang.Throwable t)
msg - t - protected static void fail()
protected static void succeed()
protected static boolean readYes()
throws java.io.IOException
java.io.IOExceptionprotected static boolean getBoolOrFalse(java.lang.Boolean bool)
bool - Boolean object to check and return.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||