1 24 25 package org.objectweb.cjdbc.console.text.commands.controller; 26 27 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 28 import org.objectweb.cjdbc.console.text.ConsoleException; 29 import org.objectweb.cjdbc.console.text.commands.ConsoleCommand; 30 import org.objectweb.cjdbc.console.text.module.AbstractConsoleModule; 31 32 38 public class DropDB extends ConsoleCommand 39 { 40 41 46 public DropDB(AbstractConsoleModule module) 47 { 48 super(module); 49 } 50 51 54 public void parse(String commandText) throws Exception 55 { 56 String database = commandText.trim(); 57 if (database == null || database.equals("")) 58 throw new ConsoleException(ConsoleTranslate 59 .get("controller.command.drop.database.null")); 60 61 console.println(ConsoleTranslate.get("controller.command.drop.database.echo", 62 database)); 63 64 jmxClient.getControllerProxy().removeVirtualDatabase(database); 66 67 console.println(ConsoleTranslate.get("controller.command.drop.database.success", 68 database)); 69 } 70 71 74 public String getCommandName() 75 { 76 return "drop virtualdatabase"; 77 } 78 79 82 public String getCommandParameters() 83 { 84 return ConsoleTranslate.get("controller.command.drop.database.params"); 85 } 86 87 90 public String getCommandDescription() 91 { 92 return ConsoleTranslate.get("controller.command.drop.database.description"); 93 } 94 95 } 96 | Popular Tags |