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 DisableAll extends AbstractAdminCommand 38 { 39 40 45 public DisableAll(VirtualDatabaseAdmin module) 46 { 47 super(module); 48 } 49 50 53 public void parse(String commandText) throws Exception 54 { 55 String checkpointName = null; 56 try 57 { 58 checkpointName = commandText.trim(); 59 } 60 catch (Exception e) 61 { 62 63 } 64 VirtualDatabaseMBean vdjc = jmxClient.getVirtualDatabaseProxy(dbName, user, 65 password); 66 if (checkpointName == null || checkpointName.equals("")) 67 vdjc.disableAllBackends(); 68 else 69 vdjc.disableAllBackendsWithCheckpoint(checkpointName); 70 } 71 72 75 public String getCommandName() 76 { 77 78 return "disableAll"; 79 } 80 81 84 public String getCommandDescription() 85 { 86 return ConsoleTranslate.get("admin.command.disableAll"); 87 } 88 89 } 90 | Popular Tags |