Removed deprecated code

Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
Emmanuel Bigeon 2016-11-19 19:50:36 -05:00
parent fff9f4ea74
commit fd8dde32f1
4 changed files with 5 additions and 50 deletions

View File

@ -87,7 +87,7 @@ of Emmanuel Bigeon. -->
<dependency> <dependency>
<groupId>fr.bigeon</groupId> <groupId>fr.bigeon</groupId>
<artifactId>gclc</artifactId> <artifactId>gclc</artifactId>
<version>1.2.5</version> <version>1.2.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>fr.bigeon</groupId> <groupId>fr.bigeon</groupId>

View File

@ -53,7 +53,7 @@
<dependency> <dependency>
<groupId>fr.bigeon</groupId> <groupId>fr.bigeon</groupId>
<artifactId>gclc</artifactId> <artifactId>gclc</artifactId>
<version>1.2.3</version> <version>1.2.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>fr.bigeon</groupId> <groupId>fr.bigeon</groupId>

View File

@ -23,7 +23,7 @@
<dependency> <dependency>
<groupId>fr.bigeon</groupId> <groupId>fr.bigeon</groupId>
<artifactId>gclc</artifactId> <artifactId>gclc</artifactId>
<version>1.2.5</version> <version>1.2.6</version>
</dependency> </dependency>
</dependencies> </dependencies>
<name>GCLC system command</name> <name>GCLC system command</name>

View File

@ -43,8 +43,6 @@ import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import fr.bigeon.gclc.command.ExitCommand;
import fr.bigeon.gclc.command.HelpExecutor;
import fr.bigeon.gclc.command.ICommand; import fr.bigeon.gclc.command.ICommand;
import fr.bigeon.gclc.command.ICommandProvider; import fr.bigeon.gclc.command.ICommandProvider;
import fr.bigeon.gclc.command.SubedCommand; import fr.bigeon.gclc.command.SubedCommand;
@ -54,7 +52,6 @@ import fr.bigeon.gclc.exception.CommandRunExceptionType;
import fr.bigeon.gclc.exception.InvalidCommandName; import fr.bigeon.gclc.exception.InvalidCommandName;
import fr.bigeon.gclc.i18n.Messages; import fr.bigeon.gclc.i18n.Messages;
import fr.bigeon.gclc.manager.ConsoleManager; import fr.bigeon.gclc.manager.ConsoleManager;
import fr.bigeon.gclc.manager.SystemConsoleManager;
/** <p> /** <p>
* A {@link ConsoleApplication} is an application that require the user to input * A {@link ConsoleApplication} is an application that require the user to input
@ -63,7 +60,8 @@ import fr.bigeon.gclc.manager.SystemConsoleManager;
* A typical use case is the following: * A typical use case is the following:
* *
* <pre> * <pre>
* {@link ConsoleApplication} app = new {@link ConsoleApplication#ConsoleApplication(String, String, String) ConsoleApplication("exit", "welcome", "see you latter")}; * {@link ConsoleManager} manager = new {@link fr.bigeon.gclc.manager.SystemConsoleManager#SystemConsoleManager()}
* {@link ConsoleApplication} app = new {@link ConsoleApplication#ConsoleApplication(ConsoleManager, String, String) ConsoleApplication(manager, "welcome", "see you latter")};
* app.{@link ConsoleApplication#add(ICommand) add}("my_command", new {@link ICommand MyCommand()}); * app.{@link ConsoleApplication#add(ICommand) add}("my_command", new {@link ICommand MyCommand()});
* app.{@link ConsoleApplication#start start}(); * app.{@link ConsoleApplication#start start}();
* </pre> * </pre>
@ -103,54 +101,11 @@ public class ConsoleApplication implements ICommandProvider {
root = new SubedCommand(""); //$NON-NLS-1$ root = new SubedCommand(""); //$NON-NLS-1$
} }
/** @param manager the manager
* @param exit the keyword for the exit command of this application
* @param welcome the header message to display on launch of this
* application
* @param goodbye the message to display on exit
* @throws InvalidCommandName if the exit command name is invalid
* @deprecated since 1.2.0, use the {@link #add(ICommand)} method to add the
* exit command */
@Deprecated
public ConsoleApplication(ConsoleManager manager, String exit,
String welcome, String goodbye) throws InvalidCommandName {
this(manager, welcome, goodbye);
root.add(new ExitCommand(exit, this));
}
/** @param exit the keyword for the exit command of this application
* @param welcome the header message to display on launch of this
* application
* @param goodbye the message to display on exit
* @throws InvalidCommandName if the exit command name is invalid
* @deprecated since 1.2.0, use the {@link #add(ICommand)} method to add the
* command and create this console using the
* {@link #ConsoleApplication(ConsoleManager, String, String)}
* method with a {@link SystemConsoleManager} as argument */
@Deprecated
public ConsoleApplication(String exit, String welcome,
String goodbye) throws InvalidCommandName {
this(new SystemConsoleManager(), welcome, goodbye);
root.add(new ExitCommand(exit, this));
}
@Override @Override
public final boolean add(ICommand cmd) throws InvalidCommandName { public final boolean add(ICommand cmd) throws InvalidCommandName {
return root.add(cmd); return root.add(cmd);
} }
/** Adds help command on the given key
*
* @param cmd the handle for help
* @return if the help command was added
* @throws InvalidCommandName if the help command was not valid
* @deprecated since 1.2.0 use the {@link #add(ICommand)} with a
* {@link HelpExecutor} instead */
@Deprecated
public final boolean addHelpCommand(String cmd) throws InvalidCommandName {
return root.add(new HelpExecutor(cmd, manager, root));
}
/** Add a command request listener. /** Add a command request listener.
* <p> * <p>
* A listener can listen several times to the same application. * A listener can listen several times to the same application.