org.owasp.orizon.library
Class Recipe

java.lang.Object
  extended by org.owasp.orizon.O
      extended by org.owasp.orizon.xml.Reader
          extended by org.owasp.orizon.library.Recipe

public class Recipe
extends Reader

The Owasp Orizon Recipe. A recipe is an XML file containing security checks. It is stored into a CookBook and it is named as recipe_n.xml where n is an ordinal number starting from 1.

Since:
1.0pre1
Author:
thesp0nge
See Also:
Report

Field Summary
 
Fields inherited from class org.owasp.orizon.xml.Reader
doc, docBuilder, docBuilderFactory, readFlag, result_ready, xmlFilename
 
Fields inherited from class org.owasp.orizon.O
base64, hasName, initialized, line_start, line_stop, log, reduced, what
 
Constructor Summary
Recipe(java.lang.String path, int index)
          Creates a new Recipe where security checks are stored.
 
Method Summary
 void disable()
           
 void enable()
           
 Check getCheck(int index)
          Returns the index-th check.
 int getChecks()
           
 int getChecksCount()
           
 java.lang.String getContent()
           
 java.lang.String getDescription()
           
 java.util.Vector<Reportable> getFaultyChecks()
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 float getWeight()
           
 void load(Source s)
           
 boolean read()
           
 boolean review()
           
 void setProperties(java.util.HashMap<java.lang.String,java.lang.String> p)
           
 
Methods inherited from class org.owasp.orizon.xml.Reader
areResultsReady, clean, dispose, getDocumentRoot, getXmlFilename, isGoodDocumentRoot, isSupported, readCalled, readXmlNode
 
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

Recipe

public Recipe(java.lang.String path,
              int index)
Creates a new Recipe where security checks are stored.

Parameters:
path - the path to the current cookbook (e.g. "library/O_CR_1/")
index - the recipe ordinal number used to build the recipe name
Method Detail

setProperties

public void setProperties(java.util.HashMap<java.lang.String,java.lang.String> p)

getId

public java.lang.String getId()

getName

public java.lang.String getName()

getDescription

public java.lang.String getDescription()

getWeight

public float getWeight()

getChecks

public int getChecks()

read

public boolean read()
Specified by:
read in class Reader

getContent

public java.lang.String getContent()

getChecksCount

public int getChecksCount()

review

public boolean review()

getFaultyChecks

public java.util.Vector<Reportable> getFaultyChecks()

getCheck

public Check getCheck(int index)
Returns the index-th check. Index value must be between 1 and the recipes number, otherwise nothing has been returned.

Parameters:
index - the check ordinal number
Returns:
a check or null if index is out of bound or recipe has not been read.

disable

public void disable()

enable

public void enable()

load

public void load(Source s)