org.owasp.orizon.mirage
Class Mirage

java.lang.Object
  extended by org.owasp.orizon.core.Trackable
      extended by org.owasp.orizon.core.Engine
          extended by org.owasp.orizon.mirage.Mirage

public class Mirage
extends Engine

This is the Mirage engine main class

Since:
1.1
Author:
thesp0nge

Field Summary
 
Fields inherited from class org.owasp.orizon.core.Engine
engineCantTrace, engineMissingTraceName, engineStartErrno, errno, errstr, faults, has_faults, has_output, initialized, inputName, O_E_DELIVER, O_E_ERROR, O_E_IDLE, O_E_PAUSED, O_E_READY, O_E_RUNNING, O_E_STOPPED, prompt, ps1, reader, rules, s, silence, status, t0, t1, time
 
Fields inherited from class org.owasp.orizon.core.Trackable
trace, traceName
 
Constructor Summary
Mirage()
           
Mirage(java.lang.String inputName)
           
 
Method Summary
 boolean exec(java.lang.String command)
          Engine specific execute command routine.
 java.util.Vector<Call> getIdentifiers(java.lang.String sourceName)
           
 java.lang.String getModelerMsg()
           
 SourceFinder getSources()
           
 boolean init()
          Determinate if source file can be modeled by the engine and do all initialization stuff here
 boolean isComplete()
           
 boolean open()
          Open a web application for modeling.
 boolean pause()
          Pause the engine.
protected  boolean process(java.lang.Object n)
          Engine specific freecc tree generated root node management routine.
 void setLangCode(int code)
           
 boolean shell()
          The mirage shell spawned by Osh when the special command to invoke Mirage has been issued.
 boolean start()
          Start the engine.
 boolean stop()
          Stop the engine.
 
Methods inherited from class org.owasp.orizon.core.Engine
addFault, canOutput, canPause, canRun, canStop, debug, errorString, exitOnFailure, feed, getAppName, getElapsedStatement, getErrno, getFaults, getProperties, getScanMills, getStats, getTimer, hasFaults, hasOutput, isPaused, isRunning, isStopped, isTestMode, isTurnedOn, pauseTimer, reset, resetTimer, setAppName, setErrorString, setProperties, setReader, setStats, setTestMode, startTimer, stopTimer
 
Methods inherited from class org.owasp.orizon.core.Trackable
getTraceName, isTrace, setTrace, setTraceName, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mirage

public Mirage()

Mirage

public Mirage(java.lang.String inputName)
Method Detail

setLangCode

public void setLangCode(int code)

getIdentifiers

public java.util.Vector<Call> getIdentifiers(java.lang.String sourceName)

getModelerMsg

public java.lang.String getModelerMsg()

open

public boolean open()
Open a web application for modeling. Actually, this is a wrapper for language specific modeler class open() method.

Returns:
true if model can be built, or false otherwise

shell

public boolean shell()
The mirage shell spawned by Osh when the special command to invoke Mirage has been issued.

Specified by:
shell in class Engine
Returns:
true upon exit or false if some error occured.

getSources

public SourceFinder getSources()

init

public boolean init()
Determinate if source file can be modeled by the engine and do all initialization stuff here

Specified by:
init in class Engine
Returns:
true if the source file can be read or false otherwise.

exec

public boolean exec(java.lang.String command)
Description copied from class: Engine
Engine specific execute command routine. Each engine has to be able to receive commands from the outside (the shell o the SkyLine object), process them and giving back a result. This method will executes a command.

Specified by:
exec in class Engine
Parameters:
command - the command to execute
Returns:
true if the command has been executed, or false otherwise

pause

public boolean pause()
Description copied from class: Engine
Pause the engine.

Specified by:
pause in class Engine
Returns:
true if the engine can be paused, or false otherwise.

process

protected boolean process(java.lang.Object n)
Description copied from class: Engine
Engine specific freecc tree generated root node management routine. This method will be called in exec() or shell() method giving the root node from the tree generated by each engine parser.

Specified by:
process in class Engine
Parameters:
n - the root node
Returns:
true or false if the caller routine has to exit upon return.

start

public boolean start()
Description copied from class: Engine
Start the engine. Each engine will implement in this method its task.

Specified by:
start in class Engine
Returns:
true if the engine started and performed its task, or false otherwise

stop

public boolean stop()
Description copied from class: Engine
Stop the engine. Freeze engine's activities preparing it to release results.

Specified by:
stop in class Engine
Returns:
true if the engine can be stopped, or false otherwise

isComplete

public boolean isComplete()