org.jboss.seam.captcha
@Name(value="org.jboss.seam.captcha.captcha") @Scope(value=SESSION) @Install(precedence=0) @BypassInterceptors public class Captcha extends Object implements Serializable
Constructor and Description |
---|
Captcha() |
Modifier and Type | Method and Description |
---|---|
protected String |
getChallenge()
Get the challenge question
|
protected Color |
getChallengeBackgroundColor()
May be overridden by subclasses
|
protected int |
getChallengeImageWidth()
May be overridden by subclasses
|
protected Color |
getChallengeTextColor()
May be overridden by subclasses
|
String |
getResponse() |
void |
init()
Initialize the challenge and correct response.
|
static Captcha |
instance() |
BufferedImage |
renderChallenge()
Render the challenge question as an image.
|
protected void |
setChallenge(String challenge)
Set the challenge question
|
protected void |
setCorrectResponse(String correctResponse)
Set the correct response
|
void |
setResponse(String input) |
boolean |
validateResponse(String response)
Validate that the entered response is the correct
response
|
@Create public void init()
protected void setChallenge(String challenge)
protected String getChallenge()
protected void setCorrectResponse(String correctResponse)
public boolean validateResponse(String response)
@CaptchaResponse public String getResponse()
public void setResponse(String input)
public BufferedImage renderChallenge()
protected int getChallengeImageWidth()
protected Color getChallengeBackgroundColor()
protected Color getChallengeTextColor()
public static Captcha instance()
Copyright © 2015 Seam Framework. All Rights Reserved.