Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.captcha
Class CaptchaChannelProcessorTemplate  view CaptchaChannelProcessorTemplate download CaptchaChannelProcessorTemplate.java

java.lang.Object
  extended byorg.acegisecurity.captcha.CaptchaChannelProcessorTemplate
All Implemented Interfaces:
org.acegisecurity.securechannel.ChannelProcessor, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
AlwaysTestAfterMaxRequestsCaptchaChannelProcessor, AlwaysTestAfterTimeInMillisCaptchaChannelProcessor, AlwaysTestBelowAverageTimeInMillisBetweenRequestsChannelProcessor, TestOnceAfterMaxRequestsCaptchaChannelProcessor

public abstract class CaptchaChannelProcessorTemplate
extends java.lang.Object
implements org.acegisecurity.securechannel.ChannelProcessor, org.springframework.beans.factory.InitializingBean

CaptchaChannel template : Ensures the user has enough human privileges by review of the CaptchaSecurityContext and using an abstract routine isContextValidConcerningHumanity(CaptchaSecurityContext) 55 (implemented by sub classes)

The component uses 2 main parameters for its configuration :

Version:
$Id: CaptchaChannelProcessorTemplate.java,v 1.2 2005/11/17 00:55:49 benalex Exp $

Field Summary
private  org.acegisecurity.securechannel.ChannelEntryPoint entryPoint
           
private  java.lang.String keyword
           
protected  org.apache.commons.logging.Log logger
           
private  int thresold
           
 
Constructor Summary
CaptchaChannelProcessorTemplate()
           
 
Method Summary
 void afterPropertiesSet()
          Verify if entryPoint and keyword are ok
 void decide(org.acegisecurity.intercept.web.FilterInvocation invocation, ConfigAttributeDefinition config)
          Decided whether the presented org.acegisecurity.intercept.web.FilterInvocation provides the appropriate level of channel security based on the requested ConfigAttributeDefinition.
 org.acegisecurity.securechannel.ChannelEntryPoint getEntryPoint()
           
 java.lang.String getKeyword()
           
 int getThresold()
           
(package private) abstract  boolean isContextValidConcerningHumanity(CaptchaSecurityContext context)
           
private  void redirectToEntryPoint(org.acegisecurity.intercept.web.FilterInvocation invocation)
           
 void setEntryPoint(org.acegisecurity.securechannel.ChannelEntryPoint entryPoint)
           
 void setKeyword(java.lang.String keyword)
           
 void setThresold(int thresold)
           
 boolean supports(ConfigAttribute attribute)
          Indicates whether this ChannelProcessor is able to process the passed ConfigAttribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.commons.logging.Log logger

entryPoint

private org.acegisecurity.securechannel.ChannelEntryPoint entryPoint

keyword

private java.lang.String keyword

thresold

private int thresold
Constructor Detail

CaptchaChannelProcessorTemplate

public CaptchaChannelProcessorTemplate()
Method Detail

setEntryPoint

public void setEntryPoint(org.acegisecurity.securechannel.ChannelEntryPoint entryPoint)

getEntryPoint

public org.acegisecurity.securechannel.ChannelEntryPoint getEntryPoint()

setKeyword

public void setKeyword(java.lang.String keyword)

getKeyword

public java.lang.String getKeyword()

setThresold

public void setThresold(int thresold)

getThresold

public int getThresold()

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Verify if entryPoint and keyword are ok

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

decide

public void decide(org.acegisecurity.intercept.web.FilterInvocation invocation,
                   ConfigAttributeDefinition config)
            throws java.io.IOException,
                   javax.servlet.ServletException
Description copied from interface: org.acegisecurity.securechannel.ChannelProcessor
Decided whether the presented org.acegisecurity.intercept.web.FilterInvocation provides the appropriate level of channel security based on the requested ConfigAttributeDefinition.

Specified by:
decide in interface org.acegisecurity.securechannel.ChannelProcessor

supports

public boolean supports(ConfigAttribute attribute)
Description copied from interface: org.acegisecurity.securechannel.ChannelProcessor
Indicates whether this ChannelProcessor is able to process the passed ConfigAttribute.

This allows the ChannelProcessingFilter to check every configuration attribute can be consumed by the configured ChannelDecisionManager.

Specified by:
supports in interface org.acegisecurity.securechannel.ChannelProcessor

isContextValidConcerningHumanity

abstract boolean isContextValidConcerningHumanity(CaptchaSecurityContext context)

redirectToEntryPoint

private void redirectToEntryPoint(org.acegisecurity.intercept.web.FilterInvocation invocation)
                           throws java.io.IOException,
                                  javax.servlet.ServletException