fr.paris.lutece.portal.service.captcha
Interface ICaptchaSecurityService

All Known Implementing Classes:
CaptchaSecurityService

public interface ICaptchaSecurityService

The interface for Captcha security service


Field Summary
static java.lang.String EMPTY_STRING
           
 
Method Summary
 java.lang.String getActiveBlockHtml()
           
 java.lang.String getHtmlCode()
          Return an EMPTY_STRING if service is not available nor active
 boolean isActive()
           
 boolean isAvailable()
           
 void setActive(boolean bActive)
          Activate the service for the current client
 boolean validate(javax.servlet.http.HttpServletRequest request)
          Validates a captcha only if the service is available and active
 

Field Detail

EMPTY_STRING

static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values
Method Detail

getHtmlCode

java.lang.String getHtmlCode()
Return an EMPTY_STRING if service is not available nor active

Returns:
the html code of a captcha

getActiveBlockHtml

java.lang.String getActiveBlockHtml()
Returns:
the html code used by an admin to activate the captcha

validate

boolean validate(javax.servlet.http.HttpServletRequest request)
Validates a captcha only if the service is available and active

Parameters:
request - the request, which must contain the parameter j_captcha_response
Returns:
true if captcha is valid or service is not available

setActive

void setActive(boolean bActive)
Activate the service for the current client

Parameters:
bActive - True to activate, otherwise false

isAvailable

boolean isAvailable()
Returns:
true if a captcha security service is loaded

isActive

boolean isActive()
Returns:
true if the service is active for the current client


Copyright © 2010 Mairie de Paris. All Rights Reserved.