1 24 25 package org.objectweb.cjdbc.console.text.commands.dbadmin; 26 27 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 28 import org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean; 29 import org.objectweb.cjdbc.console.text.module.VirtualDatabaseAdmin; 30 31 37 public class RemoveDump extends AbstractAdminCommand 38 { 39 40 45 public RemoveDump(VirtualDatabaseAdmin module) 46 { 47 super(module); 48 } 49 50 53 public void parse(String commandText) throws Exception 54 { 55 String dumpName = commandText.trim(); 56 57 if ("".equals(dumpName)) 58 { 59 console.printError(getUsage()); 60 return; 61 } 62 63 console.println(ConsoleTranslate.get( 64 "admin.command.remove.dump.echo", dumpName)); 65 VirtualDatabaseMBean vdjc = jmxClient.getVirtualDatabaseProxy(dbName, user, 66 password); 67 boolean success = vdjc.removeDump(dumpName); 68 if (success) 69 { 70 console.printInfo(ConsoleTranslate 71 .get("admin.command.remove.dump.done")); 72 } 73 else 74 { 75 console.printError(ConsoleTranslate 76 .get("admin.command.remove.dump.notdone")); 77 } 78 } 79 80 83 public String getCommandName() 84 { 85 return "delete dump"; 86 } 87 88 91 public String getCommandDescription() 92 { 93 return ConsoleTranslate.get("admin.command.remove.dump.description"); 94 } 95 96 99 public String getCommandParameters() 100 { 101 return ConsoleTranslate.get("admin.command.remove.dump.parameters"); 102 } 103 } 104 | Popular Tags |