Public Member Functions | |
String | getCommandParameters () |
Load (AbstractConsoleModule module) | |
void | parse (String commandText) throws Exception |
String | getCommandName () |
String | getCommandDescription () |
Definition at line 41 of file Load.java.
|
Creates a new
Definition at line 57 of file Load.java. 00058 { 00059 super(module); 00060 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 109 of file Load.java. 00110 { 00111 return ConsoleTranslate.get("controller.command.load"); 00112 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 101 of file Load.java. 00102 { 00103 return "load"; 00104 }
|
|
Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 47 of file Load.java. 00048 { 00049 return "<pathtoXMLfile>"; 00050 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 65 of file Load.java. References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getControllerProxy(), org.objectweb.cjdbc.console.text.Console.println(), and org.objectweb.cjdbc.console.text.Console.readLine(). 00066 { 00067 String filename = null; 00068 // Get the file name if needed 00069 if (commandText == null || commandText.trim().equals("")) 00070 filename = console.readLine(ConsoleTranslate 00071 .get("controller.command.load.input")); 00072 else 00073 filename = commandText.trim(); 00074 if (filename == null) 00075 throw new ConsoleException(ConsoleTranslate 00076 .get("controller.command.load.file.null")); 00077 FileReader fileReader; 00078 fileReader = new FileReader(filename); 00079 00080 // Read the file 00081 BufferedReader in = new BufferedReader(fileReader); 00082 StringBuffer xml = new StringBuffer(); 00083 String line; 00084 do 00085 { 00086 line = in.readLine(); 00087 if (line != null) 00088 xml.append(line); 00089 } 00090 while (line != null); 00091 00092 // Send it to the controller 00093 jmxClient.getControllerProxy().addVirtualDatabases(xml.toString()); 00094 console.println(ConsoleTranslate.get("controller.command.load.success", 00095 filename)); 00096 }
|