net.jot.web.captcha
Class JOTSendCaptchaView

java.lang.Object
  extended by net.jot.web.ctrl.JOTController
      extended by net.jot.web.view.JOTView
          extended by net.jot.web.captcha.JOTSendCaptchaView

public class JOTSendCaptchaView
extends JOTView

Author:
tcolar

Field Summary
static int blockIPForMn
           
static java.lang.String CAPTCHA_SESSION_ID
           
static JOTRequestCounter counter
           
static boolean enableSecurity
           
static JOTCaptchaGeneratorInterface gen
           
static int maxRequestPerIPPer10Mn
           
static JOTAbstractImageWriterInterface writer
           
 
Fields inherited from class net.jot.web.ctrl.JOTController
filterChain, filterConfig, request, response, RESULT_COMPLETED, RESULT_FAILURE, RESULT_FORBIDDEN, RESULT_SUCCESS, RESULT_VALIDATION_FAILURE, session
 
Constructor Summary
JOTSendCaptchaView()
           
 
Method Summary
static JOTCaptchaGeneratorInterface getGenerator()
           
 void prepareViewData()
          To be implemented by subclass Loads the View data by calling add* etc ...
static void setBlockIPForMn(int blockIPForMn)
           
static void setEnableSecurity(boolean enableSecurity)
          call when initializing your app if you want to enable security
static void setGenerator(JOTCaptchaGeneratorInterface gen)
          call during your app initialization if you want to use a cutom generator rather than the default one
static void setImageWriter(JOTAbstractImageWriterInterface writer)
          call during your app initialization if you want to use a cutom imageWriter rather than the default one
static void setMaxRequestPerIPPer10Mn(int maxRequestPerIPPer10Mn)
           
 boolean validatePermissions()
          Implements this to check wether the user is allowed to use your controller.
 
Methods inherited from class net.jot.web.view.JOTView
addBlock, addForm, addTag, addVariable, getBlocks, getBuiltinTemplate, getForms, getTags, getVariables, isProvideRequestParameters, process, setBuiltinTemplate, setProvideRequestParameters
 
Methods inherited from class net.jot.web.ctrl.JOTController
getDataHolder, getForm, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAPTCHA_SESSION_ID

public static final java.lang.String CAPTCHA_SESSION_ID
See Also:
Constant Field Values

counter

public static JOTRequestCounter counter

enableSecurity

public static boolean enableSecurity

writer

public static JOTAbstractImageWriterInterface writer

gen

public static JOTCaptchaGeneratorInterface gen

maxRequestPerIPPer10Mn

public static int maxRequestPerIPPer10Mn

blockIPForMn

public static int blockIPForMn
Constructor Detail

JOTSendCaptchaView

public JOTSendCaptchaView()
Method Detail

prepareViewData

public void prepareViewData()
                     throws java.lang.Exception
Description copied from class: JOTView
To be implemented by subclass Loads the View data by calling add* etc ...

Specified by:
prepareViewData in class JOTView
Throws:
java.lang.Exception

validatePermissions

public boolean validatePermissions()
Description copied from class: JOTController
Implements this to check wether the user is allowed to use your controller. This is the simplest way to secure the application. If this returns false, the controller won't be ran and a "RESULT_FORBIDDEN" will be sent. The user can then be sent to a 'forbidden' page.

Specified by:
validatePermissions in class JOTController
Returns:

setEnableSecurity

public static void setEnableSecurity(boolean enableSecurity)
call when initializing your app if you want to enable security

Parameters:
enableSecurity: - enable or not

setGenerator

public static void setGenerator(JOTCaptchaGeneratorInterface gen)
call during your app initialization if you want to use a cutom generator rather than the default one

Parameters:
gen -

setImageWriter

public static void setImageWriter(JOTAbstractImageWriterInterface writer)
call during your app initialization if you want to use a cutom imageWriter rather than the default one

Parameters:
writer -

setBlockIPForMn

public static void setBlockIPForMn(int blockIPForMn)

setMaxRequestPerIPPer10Mn

public static void setMaxRequestPerIPPer10Mn(int maxRequestPerIPPer10Mn)

getGenerator

public static JOTCaptchaGeneratorInterface getGenerator()