name.angoca.db2sa.core
Class InterfaceCore

Package class diagram package InterfaceCore
java.lang.Object
  extended by name.angoca.db2sa.core.InterfaceCore

public final class InterfaceCore
extends Object

This class is the interface with other upper layers. This is the only class that the other layers have to use.
Control Version

Version:
1.0.0 2009-07-19
Author:
Andres Gomez Casanova (AngocA)

Method Summary
static ReturnOptions analyzePhrase(String phrase)
          Process the phrase written by the user and prints its result.
static ExecutionState executeCommand(String command, OutputWriter writer)
          Execute the given command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

analyzePhrase

public static ReturnOptions analyzePhrase(String phrase)
                                   throws AbstractDB2SAException
Process the phrase written by the user and prints its result.

Parameters:
phrase - Phrase to analyze.
Returns:
An object that represents the command completed or the options for the current command.
Throws:
AbstractDB2SAException - There is a problem in the application.

executeCommand

public static ExecutionState executeCommand(String command,
                                            OutputWriter writer)
                                     throws AbstractDB2SAException
Execute the given command. Here, the application does not make a phrase analyzes and it passes directly the command to the interpreter, that in this case is DB2.

Parameters:
command - The complete command to execute.
writer - The output's writer.
Returns:
The state of the execution of the command.
Throws:
AbstractDB2SAException - If any exception occurred while executing.


Andres Gomez Casanova (AngocA) Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.