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 DisableRead extends AbstractAdminCommand 38 { 39 40 45 public DisableRead(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 return; 59 } 60 String backendName = commandText.trim(); 61 console.println(ConsoleTranslate.get("admin.command.disable.read.echo", 62 backendName)); 63 DatabaseBackendMBean mbean = jmxClient.getDatabaseBackendProxy(dbName, 64 backendName, user, password); 65 mbean.disableRead(); 66 } 67 68 71 public String getCommandName() 72 { 73 return "disable read"; 74 } 75 76 79 public String getCommandDescription() 80 { 81 return ConsoleTranslate.get("admin.command.disable.read.description"); 82 } 83 84 87 public String getCommandParameters() 88 { 89 return ConsoleTranslate.get("admin.command.disable.read.params"); 90 } 91 } | Popular Tags |