src/org/objectweb/cjdbc/console/text/commands/dbadmin/Restore.java

説明を見る。
00001 00025 package org.objectweb.cjdbc.console.text.commands.dbadmin; 00026 00027 import java.util.StringTokenizer; 00028 00029 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 00030 import org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean; 00031 import org.objectweb.cjdbc.console.text.module.VirtualDatabaseAdmin; 00032 00039 public class Restore extends AbstractAdminCommand 00040 { 00041 00047 public Restore(VirtualDatabaseAdmin module) 00048 { 00049 super(module); 00050 } 00051 00055 public void parse(String commandText) throws Exception 00056 { 00057 String checkpoint = null; 00058 String backendName = null; 00059 StringTokenizer st = new StringTokenizer(commandText.trim()); 00060 00061 try 00062 { 00063 backendName = st.nextToken(); 00064 checkpoint = st.nextToken(); 00065 00066 console.println(ConsoleTranslate.get("admin.command.restore.echo", 00067 new String[]{backendName, checkpoint})); 00068 VirtualDatabaseMBean vjdc = jmxClient.getVirtualDatabaseProxy(dbName, 00069 user, password); 00070 vjdc.restoreBackendFromBackupCheckpoint(backendName, checkpoint); 00071 } 00072 catch (Exception e) 00073 { 00074 if (checkpoint == null) 00075 { 00076 console.println(ConsoleTranslate 00077 .get("admin.command.restore.need.checkpoint")); 00078 } 00079 if (backendName == null) 00080 { 00081 console.println(ConsoleTranslate 00082 .get("admin.command.restore.need.backend")); 00083 } 00084 } 00085 } 00086 00090 public String getCommandName() 00091 { 00092 00093 return "restore"; 00094 } 00095 00099 public String getCommandDescription() 00100 { 00101 return ConsoleTranslate.get("admin.command.restore"); 00102 } 00103 00107 public String getCommandParameters() 00108 { 00109 return "<backend> [<checkpoint>]"; 00110 } 00111 }

CJDBCversion1.0.4に対してTue Oct 12 15:15:59 2004に生成されました。 doxygen 1.3.8