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.DatabaseBackendMBean; 29 import org.objectweb.cjdbc.console.text.module.VirtualDatabaseAdmin; 30 31 37 public class EnableRead extends AbstractAdminCommand 38 { 39 40 45 public EnableRead(VirtualDatabaseAdmin module) 46 { 47 super(module); 48 } 49 50 53 public void parse(String commandText) throws Exception 54 { 55 if (commandText.trim().length() == 0) 56 { 57 console.printError(getUsage()); 58 } 59 String backendName = commandText.trim(); 60 console.println(ConsoleTranslate.get("admin.command.enable.read.echo", 61 backendName)); 62 DatabaseBackendMBean mbean = jmxClient.getDatabaseBackendProxy(dbName, 63 backendName, user, password); 64 mbean.enableRead(); 65 } 66 67 70 public String getCommandName() 71 { 72 return "enable read"; 73 } 74 75 78 public String getCommandDescription() 79 { 80 return ConsoleTranslate.get("admin.command.enable.read.description"); 81 } 82 83 86 public String getCommandParameters() 87 { 88 return ConsoleTranslate.get("admin.command.enable.read.params"); 89 } 90 } | Popular Tags |