|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.octo.captcha.service.captchastore.JBossCacheCaptchaStore
public class JBossCacheCaptchaStore
JBossCache 2.0.0 implementation of the captcha store. Needs JDK 5.0
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCache| Field Summary | |
|---|---|
static java.lang.String |
JCAPTCHA_JBOSSCACHE_CONFIG
|
| Constructor Summary | |
|---|---|
JBossCacheCaptchaStore()
|
|
JBossCacheCaptchaStore(java.lang.String cacheQualifiedName)
|
|
| Method Summary | |
|---|---|
void |
cleanAndShutdown()
Called by the service in order to clean and shutdown the store. |
void |
empty()
Empty the store |
Captcha |
getCaptcha(java.lang.String s)
Retrieve the captcha for this key from the store. |
java.util.Collection |
getKeys()
Return all the contained keys |
java.util.Locale |
getLocale(java.lang.String s)
Retrieve the locale for this key from the store. |
int |
getSize()
get the size of this store |
boolean |
hasCaptcha(java.lang.String s)
Check if a captcha is stored for this id |
void |
initAndStart()
Called by the service in order to initialize and start the Store. |
boolean |
removeCaptcha(java.lang.String s)
Remove the captcha with the provided id as key. |
void |
storeCaptcha(java.lang.String s,
Captcha captcha)
Store the captcha with the provided id as key. |
void |
storeCaptcha(java.lang.String s,
Captcha captcha,
java.util.Locale locale)
Store the captcha with the provided id as key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String JCAPTCHA_JBOSSCACHE_CONFIG
| Constructor Detail |
|---|
public JBossCacheCaptchaStore()
public JBossCacheCaptchaStore(java.lang.String cacheQualifiedName)
| Method Detail |
|---|
public boolean hasCaptcha(java.lang.String s)
CaptchaStore
hasCaptcha in interface CaptchaStore
public void storeCaptcha(java.lang.String s,
Captcha captcha)
throws CaptchaServiceException
CaptchaStore
storeCaptcha in interface CaptchaStores - the keycaptcha - the captcha
CaptchaServiceException - if the captcha already exists, or if an error occurs during storing routine.
public void storeCaptcha(java.lang.String s,
Captcha captcha,
java.util.Locale locale)
throws CaptchaServiceException
CaptchaStore
storeCaptcha in interface CaptchaStores - the keycaptcha - the captchalocale - the locale used that triggers the captcha generation
CaptchaServiceException - if the captcha already exists, or if an error occurs during storing routine.public boolean removeCaptcha(java.lang.String s)
CaptchaStore
removeCaptcha in interface CaptchaStores - the key
public Captcha getCaptcha(java.lang.String s)
throws CaptchaServiceException
CaptchaStore
getCaptcha in interface CaptchaStoreCaptchaServiceException - if an error occurs during retrieving routine.
public java.util.Locale getLocale(java.lang.String s)
throws CaptchaServiceException
CaptchaStore
getLocale in interface CaptchaStoreCaptchaServiceException - if an error occurs during retrieving routine.public int getSize()
CaptchaStore
getSize in interface CaptchaStorepublic java.util.Collection getKeys()
CaptchaStore
getKeys in interface CaptchaStorepublic void empty()
CaptchaStore
empty in interface CaptchaStorepublic void initAndStart()
CaptchaStore
initAndStart in interface CaptchaStorepublic void cleanAndShutdown()
CaptchaStore
cleanAndShutdown in interface CaptchaStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||