|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.seam.captcha.Captcha
@Name(value="org.jboss.seam.captcha.captcha") @Scope(value=SESSION) @Install(precedence=0) @BypassInterceptors public class Captcha
Default CAPTCHA algorithm, a simple addition problem. May be extended and customized.
Constructor Summary | |
---|---|
Captcha()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Captcha()
Method Detail |
---|
@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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |