00001 00025 package org.objectweb.cjdbc.console.text.commands.controller; 00026 00027 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 00028 import org.objectweb.cjdbc.console.text.commands.ConsoleCommand; 00029 import org.objectweb.cjdbc.console.text.module.AbstractConsoleModule; 00030 00037 public class Admin extends ConsoleCommand 00038 { 00039 00043 public String getCommandParameters() 00044 { 00045 return "<virtualDatabaseName>"; 00046 } 00047 00053 public Admin(AbstractConsoleModule module) 00054 { 00055 super(module); 00056 } 00057 00061 public void parse(String commandText) throws Exception 00062 { 00063 console.getAdminModule().login(new String[]{commandText.trim()}); 00064 console.getAdminModule().handlePrompt(); 00065 } 00066 00070 public String getCommandName() 00071 { 00072 return "admin"; 00073 } 00074 00078 public String getCommandDescription() 00079 { 00080 return ConsoleTranslate.get("controller.command.admin"); 00081 } 00082 00083 }