Interface ICaptchaSecurityService
-
- All Known Implementing Classes:
CaptchaSecurityService
public interface ICaptchaSecurityServiceThe interface for Captcha security service
-
-
Field Summary
Fields Modifier and Type Field Description static StringEMPTY_STRING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetActiveBlockHtml()StringgetHtmlCode()Return an EMPTY_STRING if service is not available nor activebooleanisActive()booleanisAvailable()voidsetActive(boolean bActive)Activate the service for the current clientbooleanvalidate(javax.servlet.http.HttpServletRequest request)Validates a captcha only if the service is available and active
-
-
-
Field Detail
-
EMPTY_STRING
static final String EMPTY_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHtmlCode
String getHtmlCode()
Return an EMPTY_STRING if service is not available nor active- Returns:
- the html code of a captcha
-
getActiveBlockHtml
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
-
-