org.acegisecurity.captcha
Class CaptchaChannelProcessorTemplate

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

public abstract class CaptchaChannelProcessorTemplate
extends java.lang.Object
implements 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) (implemented by sub classes)

The component uses 2 main parameters for its configuration :

Version:
$Id: CaptchaChannelProcessorTemplate.java 1496 2006-05-23 13:38:33Z benalex $
Author:
marc antoine Garrigue

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
CaptchaChannelProcessorTemplate()
           
 
Method Summary
 void afterPropertiesSet()
          Verify if entryPoint and keyword are ok
 void decide(FilterInvocation invocation, ConfigAttributeDefinition config)
          Decided whether the presented FilterInvocation provides the appropriate level of channel security based on the requested ConfigAttributeDefinition.
 ChannelEntryPoint getEntryPoint()
           
 java.lang.String getKeyword()
           
 int getThresold()
           
 void setEntryPoint(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
Constructor Detail

CaptchaChannelProcessorTemplate

public CaptchaChannelProcessorTemplate()
Method Detail

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
Throws:
java.lang.Exception - if not

decide

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

Specified by:
decide in interface ChannelProcessor
Parameters:
invocation - DOCUMENT ME!
config - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
javax.servlet.ServletException - DOCUMENT ME!

getEntryPoint

public ChannelEntryPoint getEntryPoint()

getKeyword

public java.lang.String getKeyword()

getThresold

public int getThresold()

setEntryPoint

public void setEntryPoint(ChannelEntryPoint entryPoint)

setKeyword

public void setKeyword(java.lang.String keyword)

setThresold

public void setThresold(int thresold)

supports

public boolean supports(ConfigAttribute attribute)
Description copied from interface: 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 ChannelProcessor
Parameters:
attribute - a configuration attribute that has been configured against the ChannelProcessingFilter
Returns:
true if this ChannelProcessor can support the passed configuration attribute


Copyright © 2004-2012 Interface21, Inc. All Rights Reserved.