org.owasp.orizon.library
Class Library

java.lang.Object
  extended by org.owasp.orizon.core.Trackable
      extended by org.owasp.orizon.core.Engine
          extended by org.owasp.orizon.library.Library

public class Library
extends Engine

Library is a particular engine created to act as interface between Orizon and ORL stored into the library. Since, we moved to a separated JAR archive for the library, now we want to provide an executable class even for this JAR in order to handle in some way the ORL stored inside.

Since:
1.16.a
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
Library()
           
Library(java.lang.String root)
           
 
Method Summary
 boolean exec(java.lang.String command)
          Engine specific execute command routine.
 java.io.BufferedReader getOrl(java.lang.Integer code)
           
 boolean iAmInJar()
           
 boolean init()
          Initialize the engine.
static void main(java.lang.String[] args)
           
 boolean pause()
          Pause the engine.
protected  boolean process(java.lang.Object n)
          Engine specific freecc tree generated root node management routine.
 boolean shell()
          Engine specific interactive shell.
 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

Library

public Library()

Library

public Library(java.lang.String root)
Method Detail

iAmInJar

public final boolean iAmInJar()

getOrl

public final java.io.BufferedReader getOrl(java.lang.Integer code)
                                    throws java.io.IOException
Throws:
java.io.IOException

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

init

public boolean init()
Description copied from class: Engine
Initialize the engine. The initialization status must be stored in the initialized variable.

Specified by:
init in class Engine
Returns:
true if the engine can be initialized, 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.

shell

public boolean shell()
Description copied from class: Engine
Engine specific interactive shell. OSH will permit users to interact with Orizon engines direct issuing them commands. For such a reason an interactive shell needs to be spawned.

Specified by:
shell in class Engine
Returns:
true if the shell can be spawned, or false otherwise.

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

main

public static void main(java.lang.String[] args)