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
Class ReCaptchaResponse

java.lang.Object
  extended by org.torweg.pulse.util.captcha.AbstractCaptchaResponse
      extended by org.torweg.pulse.util.captcha.ReCaptchaResponse

public class ReCaptchaResponse
extends AbstractCaptchaResponse

A response-wrapper for the captcha-validation-request-response of the recaptcha-library.

Version:
$Revision: 1407 $
Author:
Daniel Dietz

Constructor Summary
ReCaptchaResponse()
          Default constructor.
ReCaptchaResponse(net.tanesha.recaptcha.ReCaptchaResponse response)
          Creates a new ReCaptchaResponse from a given net.tanesha.recaptcha.ReCaptchaResponse.
 
Method Summary
 java.lang.String getErrorMessage()
          Returns the error-message if the captcha has not passed validation.
 boolean isValid()
          Returns whether the captcha has passed validation.
protected  void setErrorMessage(java.lang.String errorMsg)
          Sets the error-message of the ReCaptchaResponse.
protected  void setValid(boolean isValid)
          Sets the validity-state of the ReCaptchaResponse.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReCaptchaResponse

public ReCaptchaResponse()
Default constructor.


ReCaptchaResponse

public ReCaptchaResponse(net.tanesha.recaptcha.ReCaptchaResponse response)
Creates a new ReCaptchaResponse from a given net.tanesha.recaptcha.ReCaptchaResponse.

Parameters:
response - a net.tanesha.recaptcha.ReCaptchaResponse
Method Detail

setValid

protected final void setValid(boolean isValid)
Sets the validity-state of the ReCaptchaResponse.

Parameters:
isValid - the validity-state to set

isValid

public final boolean isValid()
Returns whether the captcha has passed validation.

Specified by:
isValid in class AbstractCaptchaResponse
Returns:
true if the captcha has passed validation, false otherwise

setErrorMessage

protected final void setErrorMessage(java.lang.String errorMsg)
Sets the error-message of the ReCaptchaResponse.

Parameters:
errorMsg - the error-message to set

getErrorMessage

public final java.lang.String getErrorMessage()
Returns the error-message if the captcha has not passed validation.

Specified by:
getErrorMessage in class AbstractCaptchaResponse
Returns:
the error-message