org.objectweb.cjdbc.controller.console
Interface ConsoleHelperInterface

All Known Implementing Classes:
CommandLineConsoleHelper, GUIConsoleHelper

public interface ConsoleHelperInterface

Console helper interface.

Version:
1.0
Author:
Mathieu Peltier

Method Summary
 void print(java.lang.String s)
          Prints a String.
 void printError(java.lang.String message)
          Prints an error message followed by a new line.
 void println()
          Prints a new line.
 void println(java.lang.String s)
          Prints a String followed by a new line.
 java.lang.String readLine(java.lang.String prompt)
          Gets a command.
 java.lang.String readPassword(java.lang.String prompt)
          Gets a password.
 void setCommandCompletor(CommandCompletorInterface completor)
          Sets the command completor to use.
 

Method Detail

readLine

public java.lang.String readLine(java.lang.String prompt)
                          throws ConsoleHelperException
Gets a command.

Parameters:
prompt - the prompt to display
Returns:
a String instance
Throws:
ConsoleHelperException - if an error occurs.

readPassword

public java.lang.String readPassword(java.lang.String prompt)
                              throws ConsoleHelperException
Gets a password. If possible the implementation class should not displayed the data entered by the user.

Parameters:
prompt - the prompt to display
Returns:
a String instance
Throws:
ConsoleHelperException - if an error occurs.

print

public void print(java.lang.String s)
Prints a String.

Parameters:
s - the String to print.

println

public void println(java.lang.String s)
Prints a String followed by a new line.

Parameters:
s - the String to print.

println

public void println()
Prints a new line.


printError

public void printError(java.lang.String message)
Prints an error message followed by a new line.

Parameters:
message - the error message to print.

setCommandCompletor

public void setCommandCompletor(CommandCompletorInterface completor)
Sets the command completor to use.

Parameters:
completor - a CommandCompletor instance.


Copyright © 2002, 2003 - ObjectWeb Consortium - All Rights Reserved.