Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.captcha
Class CaptchaChannelProcessorTemplate

    java.lang.Object
      org.acegisecurity.captcha.CaptchaChannelProcessorTemplate

All Implemented Interfaces:
  ChannelProcessor, InitializingBean

Direct Known Subclasses:
  AlwaysTestAfterMaxRequestsCaptchaChannelProcessor, AlwaysTestAfterTimeInMillisCaptchaChannelProcessor, AlwaysTestBelowAverageTimeInMillisBetweenRequestsChannelProcessor, TestOnceAfterMaxRequestsCaptchaChannelProcessor

    public abstract class CaptchaChannelProcessorTemplate

extends Object
implements ChannelProcessor, 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 :

- a keyword to be mapped to urls in the `ChannelProcessingFilter` configuration
  default value provided by sub classes.
- and a thresold : used by the routine `isContextValidConcerningHumanity(CaptchaSecurityContext)` to evaluate whether the `CaptchaSecurityContext` is valid default value = 0

Version:
  $Id: CaptchaChannelProcessorTemplate.java,v 1.2 2005/11/17 00:55:49 benalex Exp $
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()`
`String` | `getKeyword()`
`int` | `getThresold()`
`void` | `setEntryPoint(ChannelEntryPoint entryPoint)`
`void` | `setKeyword(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

### setEntryPoint

    public void setEntryPoint(ChannelEntryPoint entryPoint)

### getEntryPoint

    public ChannelEntryPoint getEntryPoint()

### setKeyword

    public void setKeyword(String keyword)

### getKeyword

    public String getKeyword()

### setThresold

    public void setThresold(int thresold)

### getThresold

    public int getThresold()

### afterPropertiesSet

    public void afterPropertiesSet()
                            throws Exception

  Verify if entryPoint and keyword are ok

  Specified by:
    `afterPropertiesSet` in interface `InitializingBean`
  Throws:
    `Exception` - if not

### decide

    public void decide(FilterInvocation invocation,
                       ConfigAttributeDefinition config)
                throws 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`
  Throws:
    `IOException`
    `javax.servlet.ServletException`

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.