Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.console.text.commands.History Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.text.commands.History:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.console.text.commands.History:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 History (AbstractConsoleModule module)
void parse (String commandText) throws Exception
String getCommandName ()
String getCommandDescription ()
String getCommandParameters ()

Detailed Description

This class defines a History

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 39 of file History.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.text.commands.History.History AbstractConsoleModule  module  ) 
 

Creates a new History object

Parameters:
module module that owns this commands

Definition at line 47 of file History.java.

00048   {
00049     super(module);
00050   }


Member Function Documentation

String org.objectweb.cjdbc.console.text.commands.History.getCommandDescription  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandDescription()

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 86 of file History.java.

00087   {
00088     return ConsoleTranslate.get("console.command.history");
00089   }

String org.objectweb.cjdbc.console.text.commands.History.getCommandName  )  [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandName()

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 78 of file History.java.

00079   {
00080     return "history";
00081   }

String org.objectweb.cjdbc.console.text.commands.History.getCommandParameters  ) 
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.getCommandParameters()

Reimplemented from org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 94 of file History.java.

00095   {
00096     return "[<commandIndex>]";
00097   }

void org.objectweb.cjdbc.console.text.commands.History.parse String  commandText  )  throws Exception [virtual]
 

See also:
org.objectweb.cjdbc.console.text.commands.ConsoleCommand.parse(java.lang.String)

Implements org.objectweb.cjdbc.console.text.commands.ConsoleCommand.

Definition at line 55 of file History.java.

References org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.getHashCommands(), org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.getHistory(), org.objectweb.cjdbc.console.text.module.AbstractConsoleModule.handleCommandLine(), and org.objectweb.cjdbc.console.text.Console.println().

00056   {
00057     LinkedList list = module.getHistory();
00058     StringTokenizer st = new StringTokenizer(commandText);
00059     if (st.countTokens() == 0)
00060     {
00061       for (int i = 0; i < list.size(); i++)
00062       {
00063         Object o = list.get(i);
00064         console.println("[" + i + "]\t" + o);
00065       }
00066     }
00067     else
00068     {
00069       int line = Integer.parseInt(st.nextToken());
00070       module.handleCommandLine((String) list.get(line), module
00071           .getHashCommands());
00072     }
00073   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:02:42 2005 for C-JDBC by  doxygen 1.3.9.1