pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util.captcha
Interface ICaptchaAdapter<T extends Configuration>

Type Parameters:
T - the configuration's type
All Superinterfaces:
Configurable<T>
All Known Implementing Classes:
ReCaptchaAdapter

public interface ICaptchaAdapter<T extends Configuration>
extends Configurable<T>

Interface defining an adapter to a captcha-library.

The configured ICaptchaAdapter will be available through Lifecycle.

The ICaptchaAdapter will be initialized with it's configuration by the Lifecycle.

Version:
$Revision: 1914 $
Author:
Daniel Dietz
See Also:
Lifecycle.getCaptchaAdapter()

Method Summary
 java.lang.String getDivId()
          Returns the id of the div which is to be replaced by the captcha.
 java.lang.String getPrivateKey()
          Returns the private key for the actual captcha-implementation.
 java.lang.String getPublicKey()
          Returns the public key for the actual captcha-implementation.
 AbstractCaptchaResponse validate(ServiceRequest request)
          Performs the validation-request of the captcha for the given request.
 
Methods inherited from interface org.torweg.pulse.configuration.Configurable
initialize
 

Method Detail

validate

AbstractCaptchaResponse validate(ServiceRequest request)
Performs the validation-request of the captcha for the given request.

Parameters:
request - the current ServiceRequest
Returns:
an AbstractCaptchaResponse

getPublicKey

java.lang.String getPublicKey()
Returns the public key for the actual captcha-implementation.

Returns:
the public key

getPrivateKey

java.lang.String getPrivateKey()
Returns the private key for the actual captcha-implementation.

Returns:
the private key

getDivId

java.lang.String getDivId()
Returns the id of the div which is to be replaced by the captcha.

Returns:
the div-id