00001 /** 00002 * C-JDBC: Clustered JDBC. 00003 * Copyright (C) 2005 Emic Networks. 00004 * Contact: c-jdbc@objectweb.org 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by the 00008 * Free Software Foundation; either version 2.1 of the License, or any later 00009 * version. 00010 * 00011 * This library is distributed in the hope that it will be useful, but WITHOUT 00012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 00014 * for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with this library; if not, write to the Free Software Foundation, 00018 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00019 * 00020 * Initial developer(s): Emmanuel Cecchet. 00021 * Contributor(s): ______________________. 00022 */ 00023 00024 package org.objectweb.cjdbc.console.text.commands.dbadmin; 00025 00026 import java.io.File; 00027 00028 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 00029 import org.objectweb.cjdbc.console.text.module.VirtualDatabaseAdmin; 00030 00031 /** 00032 * This class defines the command used to remove a dump file of a given virtual 00033 * database. 00034 * 00035 * @author <a href="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet 00036 * </a> 00037 * @version 1.0 00038 */ 00039 public class RemoveDumpFile extends AbstractAdminCommand 00040 { 00041 00042 /** 00043 * @see org.objectweb.cjdbc.console.text.commands.ConsoleCommand#getCommandParameters() 00044 */ 00045 public String getCommandParameters() 00046 { 00047 return "<dumpName>"; 00048 } 00049 00050 /** 00051 * Creates a new <code>RemoveCheckpoint.java</code> object 00052 * 00053 * @param module the command is attached to 00054 */ 00055 public RemoveDumpFile(VirtualDatabaseAdmin module) 00056 { 00057 super(module); 00058 } 00059 00060 /** 00061 * @see org.objectweb.cjdbc.console.text.commands.ConsoleCommand#parse(java.lang.String) 00062 */ 00063 public void parse(String commandText) throws Exception 00064 { 00065 jmxClient.getVirtualDatabaseProxy(dbName, user, password).removeDumpFile( 00066 new File(commandText.trim())); 00067 } 00068 00069 /** 00070 * @see org.objectweb.cjdbc.console.text.commands.ConsoleCommand#getCommandName() 00071 */ 00072 public String getCommandName() 00073 { 00074 return "removeDumpFile"; 00075 } 00076 00077 /** 00078 * @see org.objectweb.cjdbc.console.text.commands.ConsoleCommand#getCommandDescription() 00079 */ 00080 public String getCommandDescription() 00081 { 00082 return ConsoleTranslate.get("admin.command.removeDumpFile"); 00083 } 00084 00085 }