org.owasp.orizon.library
Class CookBook

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

public class CookBook
extends Reader

The Owasp Orizon CookBook. A cookbook is a collection of security related recipes and it is stored into the library. An XML file, called cookbook.xml must be present into the cookbook directory to describe its content.

Since:
1.0pre1
Author:
thesp0nge
See Also:
Folder

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
CookBook(java.lang.String name)
          Creates a new CookBook object where security recipes are stored.
 
Method Summary
 int getChecksCount()
           
 java.lang.String getContent()
           
 java.lang.String getCookBookPath()
           
 java.lang.String getDescription()
           
 java.util.Vector<Reportable> getFaultyChecks()
           
 java.lang.String getId()
           
 Recipe getRecipe(int index)
          Returns the index-th recipes.
 int getRecipesCount()
           
 float getWeight()
           
 boolean isEnabled()
           
 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

CookBook

public CookBook(java.lang.String name)
Creates a new CookBook object where security recipes are stored.

Parameters:
name - the name of the cookbook (e.g. O_CR_1, ...)
Method Detail

setProperties

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

getCookBookPath

public java.lang.String getCookBookPath()

getWeight

public float getWeight()

getRecipesCount

public int getRecipesCount()

isEnabled

public boolean isEnabled()

getId

public java.lang.String getId()

getDescription

public java.lang.String getDescription()

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()

getRecipe

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

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

load

public void load(Source s)