|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CaptchaStore
Provides a way to temporally store captchas with a unique key
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 id)
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 id)
Retrieve the locale for this key from the store. |
int |
getSize()
get the size of this store |
boolean |
hasCaptcha(java.lang.String id)
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 id)
Remove the captcha with the provided id as key. |
void |
storeCaptcha(java.lang.String id,
Captcha captcha)
Deprecated. in order to implement the by locale generation, use the storeCaptcha(String, com.octo.captcha.Captcha, java.util.Locale) |
void |
storeCaptcha(java.lang.String id,
Captcha captcha,
java.util.Locale locale)
Store the captcha with the provided id as key. |
Method Detail |
---|
boolean hasCaptcha(java.lang.String id)
void storeCaptcha(java.lang.String id, Captcha captcha) throws CaptchaServiceException
storeCaptcha(String, com.octo.captcha.Captcha, java.util.Locale)
id
- the keycaptcha
- the captcha
CaptchaServiceException
- if the captcha already exists, or if an error occurs during storing routine.void storeCaptcha(java.lang.String id, Captcha captcha, java.util.Locale locale) throws CaptchaServiceException
id
- 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.boolean removeCaptcha(java.lang.String id)
id
- the key
CaptchaServiceException
- if an error occurs during remove routineCaptcha getCaptcha(java.lang.String id) throws CaptchaServiceException
CaptchaServiceException
- if an error occurs during retrieving routine.java.util.Locale getLocale(java.lang.String id) throws CaptchaServiceException
CaptchaServiceException
- if an error occurs during retrieving routine.int getSize()
java.util.Collection getKeys()
void empty()
void initAndStart()
void cleanAndShutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |