net.jot.web
Class JOTFlowConfig

java.lang.Object
  extended by net.jot.web.JOTFlowConfig

public class JOTFlowConfig
extends java.lang.Object

Object representation of the flow config file: flow.conf Also provide validation methods to cross-check the flow.conf.

Author:
thibautc

Constructor Summary
JOTFlowConfig()
           
 
Method Summary
 void addDirective(JOTFlowDirective directive)
          Adds a directive found in flow.conf
 java.util.Hashtable getActions()
           
 java.util.Hashtable getBundles()
           
 java.lang.String getConfigPath()
           
 java.lang.String getError()
           
 java.lang.String getErrorRequest()
           
 java.lang.String getFlowExtension()
           
 java.lang.String getForbiddenRequest()
           
 java.util.Hashtable getForms()
           
 java.lang.String getNotFoundRequest()
           
 java.util.Hashtable getRequests()
           
 java.lang.String[] getTemplateRoots()
           
 boolean isValid()
          Returns wether the parsing of flow.conf fails Note: this does not run the extra validations in runValidation(), so usually would be called after runValidation()
 void runValidation()
          Runs a validation of the loaded flow.conf, calls setValidationError if an error is found Checks that view/controller/forms classes exists and are of right type etc...
 void setConfigPath(java.lang.String confPath)
           
 void setError(java.lang.String error)
           
 void setErrorRequest(java.lang.String request)
           
 void setFlowExtension(java.lang.String flowExtension)
           
 void setForbiddenRequest(java.lang.String request)
           
 void setNotFoundRequest(java.lang.String request)
           
 void setTemplateRoot(java.lang.String templateRoot)
           
 void setTemplateRoots(java.lang.String[] templateRoots)
           
 void setValid(boolean valid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOTFlowConfig

public JOTFlowConfig()
Method Detail

isValid

public boolean isValid()
Returns wether the parsing of flow.conf fails Note: this does not run the extra validations in runValidation(), so usually would be called after runValidation()

Returns:

getError

public java.lang.String getError()

setError

public void setError(java.lang.String error)

setValid

public void setValid(boolean valid)

getNotFoundRequest

public java.lang.String getNotFoundRequest()

setNotFoundRequest

public void setNotFoundRequest(java.lang.String request)

addDirective

public void addDirective(JOTFlowDirective directive)
                  throws java.lang.Exception
Adds a directive found in flow.conf

Parameters:
directive -
Throws:
java.lang.Exception

setErrorRequest

public void setErrorRequest(java.lang.String request)

getErrorRequest

public java.lang.String getErrorRequest()

getFlowExtension

public java.lang.String getFlowExtension()

setFlowExtension

public void setFlowExtension(java.lang.String flowExtension)

getForbiddenRequest

public java.lang.String getForbiddenRequest()

setForbiddenRequest

public void setForbiddenRequest(java.lang.String request)

getTemplateRoots

public java.lang.String[] getTemplateRoots()

setTemplateRoots

public void setTemplateRoots(java.lang.String[] templateRoots)

setTemplateRoot

public void setTemplateRoot(java.lang.String templateRoot)

setConfigPath

public void setConfigPath(java.lang.String confPath)

getConfigPath

public java.lang.String getConfigPath()

getActions

public java.util.Hashtable getActions()

getBundles

public java.util.Hashtable getBundles()

getRequests

public java.util.Hashtable getRequests()

getForms

public java.util.Hashtable getForms()

runValidation

public void runValidation()
Runs a validation of the loaded flow.conf, calls setValidationError if an error is found Checks that view/controller/forms classes exists and are of right type etc...