Public Member Functions | |
Restore (VirtualDatabaseAdmin module) | |
void | parse (String commandText) throws Exception |
String | getCommandName () |
String | getCommandDescription () |
String | getCommandParameters () |
Definition at line 41 of file Restore.java.
|
Creates a new
Definition at line 49 of file Restore.java. 00050 { 00051 super(module); 00052 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 101 of file Restore.java. 00102 { 00103 return ConsoleTranslate.get("admin.command.restore"); 00104 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 92 of file Restore.java. 00093 { 00094 00095 return "restore"; 00096 }
|
|
Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 109 of file Restore.java. 00110 { 00111 return "<backendName> <dumpName>"; 00112 }
|
|
Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand. Definition at line 57 of file Restore.java. References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getVirtualDatabaseProxy(), org.objectweb.cjdbc.console.text.Console.println(), and org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.restoreDumpOnBackend(). 00058 { 00059 String dumpName = null; 00060 String backendName = null; 00061 StringTokenizer st = new StringTokenizer(commandText.trim()); 00062 00063 try 00064 { 00065 backendName = st.nextToken(); 00066 dumpName = st.nextToken(); 00067 00068 console.println(ConsoleTranslate.get("admin.command.restore.echo", 00069 new String[]{backendName, dumpName})); 00070 VirtualDatabaseMBean vjdc = jmxClient.getVirtualDatabaseProxy(dbName, 00071 user, password); 00072 vjdc.restoreDumpOnBackend(backendName, dumpName); 00073 } 00074 catch (Exception e) 00075 { 00076 if (dumpName == null) 00077 { 00078 console.println(ConsoleTranslate 00079 .get("admin.command.restore.need.dump")); 00080 } 00081 if (backendName == null) 00082 { 00083 console.println(ConsoleTranslate 00084 .get("admin.command.restore.need.backend")); 00085 } 00086 } 00087 }
|