org.owasp.orizon
Class SkyLine

java.lang.Object
  extended by org.owasp.orizon.O
      extended by org.owasp.orizon.SkyLine

public class SkyLine
extends O

This is the Orizon assistant that must be created before starting the review in order to create a session. It will handle also tools command line if some argument must be used to Orizon engine. The idea behind this is that SkyLine will grab all arguments starting with "-o" or "--orizon". Command line parameters will be in the following format: <code> -o key=value; --orizon key=value </code> where key is the property and value is the value to be applied to (e.g. -o lang=c).

Since:
0.99
Author:
thesp0nge

Field Summary
 
Fields inherited from class org.owasp.orizon.O
base64, hasName, initialized, line_start, line_stop, log, reduced, what
 
Constructor Summary
SkyLine()
          Create a new SkyLine assistant and fills the defaultProperties HashMap object.
SkyLine(java.lang.String[] cLine)
          Create a new SkyLine assistant
 
Method Summary
 boolean arePropsMerged()
           
 boolean consumeCommandLine()
          Reads and consume command line parameters related to Orizon.
 void flushOutput()
           
 int getIssues()
           
 Mirage getMirageEngine()
           
 java.lang.String getOutput()
           
 java.lang.String getProperty(java.lang.String key)
          Returns an Orizon framework property value.
 Folder getRawScanResults()
           
 java.lang.String getReport()
           
static java.lang.String greeting()
           
static java.lang.String help()
           
 boolean isModelComplete()
           
 boolean justHelp()
           
 boolean justListCheck()
           
 boolean launch(java.lang.String service)
          Asks services to Orizon Framework facilities.
 java.lang.String listCheck()
           
 int listCheckCount()
           
 void output(java.lang.String s)
           
 boolean processCommandLine()
           
 boolean readXmlNode(org.w3c.dom.Node n)
          As far from version 0.62 all items must be responsible for XML Node reading routine.
 void setCommandLine(java.lang.String[] commandLine)
          Sets the command line used to invoke the Orizon framerwork
 boolean setProperty(java.lang.String key, java.lang.String value)
           
 void setReader(ConsoleReader reader)
           
 void setTeeName(java.lang.String name)
           
 boolean thisNameExists(java.lang.String name)
          Checks if the name supplied by parameter exists
 java.lang.String version()
           
 
Methods inherited from class org.owasp.orizon.O
clone, getStartLine, getStopLine, isCompatible, isInitialized, setStartLine, setStopLine, trackThis
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkyLine

public SkyLine()
Create a new SkyLine assistant and fills the defaultProperties HashMap object.


SkyLine

public SkyLine(java.lang.String[] cLine)
Create a new SkyLine assistant

Parameters:
cLine - the command line to be used by the Orizon framework
Method Detail

setReader

public void setReader(ConsoleReader reader)

setTeeName

public void setTeeName(java.lang.String name)

setCommandLine

public void setCommandLine(java.lang.String[] commandLine)
Sets the command line used to invoke the Orizon framerwork

Parameters:
commandLine - the command line used to invoke the Orizon framework

processCommandLine

public boolean processCommandLine()

help

public static java.lang.String help()

justListCheck

public boolean justListCheck()

justHelp

public boolean justHelp()

listCheck

public java.lang.String listCheck()

listCheckCount

public int listCheckCount()

version

public java.lang.String version()

greeting

public static java.lang.String greeting()

consumeCommandLine

public boolean consumeCommandLine()
Reads and consume command line parameters related to Orizon. Here the session is created and all code analysis parameters are saved into it

Returns:
true if the session is properly created, false otherwise.

arePropsMerged

public boolean arePropsMerged()

setProperty

public boolean setProperty(java.lang.String key,
                           java.lang.String value)

getProperty

public java.lang.String getProperty(java.lang.String key)
Returns an Orizon framework property value. If mergeProperties() was not called before, then the correspondent property default value is returned.

Parameters:
key - the required property key
Returns:
the correspodent property value taken from properties if mergeProperties() has been called befor, or from default properties otherwise. If an error occurs, an empty string is returned instead.

thisNameExists

public boolean thisNameExists(java.lang.String name)
Checks if the name supplied by parameter exists

Parameters:
name - the name to be checked
Returns:
true if name is a good file name or a good directory name, false otherwise.

launch

public boolean launch(java.lang.String service)
Asks services to Orizon Framework facilities. This is the core method called by external tools, they will ask for "services" to SkyLine class and it will ask Orizon to accomplish them if possible. Possible services are:

Parameters:
service - the service to be performed
Returns:
true if the service is completed successfully or false otherwise

isModelComplete

public boolean isModelComplete()

getReport

public java.lang.String getReport()

getIssues

public int getIssues()

readXmlNode

public boolean readXmlNode(org.w3c.dom.Node n)
Description copied from class: O
As far from version 0.62 all items must be responsible for XML Node reading routine. Source class must be able to instantiate an object passing XML Node as parameter and having that code read

Specified by:
readXmlNode in class O
Parameters:
n - the node being read
Returns:
true if xml node is well formed and correctly read, or false otherwise.

output

public void output(java.lang.String s)

getOutput

public java.lang.String getOutput()

flushOutput

public void flushOutput()

getRawScanResults

public Folder getRawScanResults()

getMirageEngine

public Mirage getMirageEngine()