|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.octo.captcha.engine.bufferedengine.buffer.DatabaseCaptchaBuffer
public class DatabaseCaptchaBuffer
A database Captcha Buffer.
The database should have the following structure : default Column Name , type
| Constructor Summary | |
|---|---|
DatabaseCaptchaBuffer(javax.sql.DataSource datasource)
|
|
DatabaseCaptchaBuffer(javax.sql.DataSource datasource,
java.lang.String table)
|
|
DatabaseCaptchaBuffer(javax.sql.DataSource datasource,
java.lang.String table,
java.lang.String timeMillisColumn,
java.lang.String hashCodeColumn,
java.lang.String captchaColumn,
java.lang.String localeColumn)
|
|
| Method Summary | |
|---|---|
void |
clear()
Clear the buffer from all locale |
void |
dispose()
Release all the ressources and close the buffer. |
java.util.Collection |
getLocales()
Get all the locales used |
void |
putAllCaptcha(java.util.Collection captchas)
Put a collection of captchas with the default locale |
void |
putAllCaptcha(java.util.Collection captchas,
java.util.Locale locale)
Put a collection of captchas with his locale |
void |
putCaptcha(Captcha captcha)
Put a captcha with default locale |
void |
putCaptcha(Captcha captcha,
java.util.Locale locale)
Put a captcha with a locale |
Captcha |
removeCaptcha()
remove a captcha from the buffer |
java.util.Collection |
removeCaptcha(int number)
Remove a precise number of captcha |
java.util.Collection |
removeCaptcha(int number,
java.util.Locale locale)
Remove a precise number of captcha with a locale |
Captcha |
removeCaptcha(java.util.Locale locale)
remove a captcha from the buffer corresponding to the locale |
int |
size()
Get the size of the buffer for all locales |
int |
size(java.util.Locale locale)
Get the size of the buffer for a locale |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatabaseCaptchaBuffer(javax.sql.DataSource datasource)
public DatabaseCaptchaBuffer(javax.sql.DataSource datasource,
java.lang.String table)
public DatabaseCaptchaBuffer(javax.sql.DataSource datasource,
java.lang.String table,
java.lang.String timeMillisColumn,
java.lang.String hashCodeColumn,
java.lang.String captchaColumn,
java.lang.String localeColumn)
| Method Detail |
|---|
public Captcha removeCaptcha()
throws java.util.NoSuchElementException
removeCaptcha in interface CaptchaBufferjava.util.NoSuchElementException - if there is no captcha throw NoSuchElementException
public Captcha removeCaptcha(java.util.Locale locale)
throws java.util.NoSuchElementException
removeCaptcha in interface CaptchaBufferlocale - The locale the catcha to remove
java.util.NoSuchElementException - if there is no captcha throw NoSuchElementExceptionpublic java.util.Collection removeCaptcha(int number)
removeCaptcha in interface CaptchaBuffernumber - The number of captchas to remove
public java.util.Collection removeCaptcha(int number,
java.util.Locale locale)
removeCaptcha in interface CaptchaBuffernumber - The number of captchas to removelocale - The locale of the removed captchas
public void putCaptcha(Captcha captcha)
putCaptcha in interface CaptchaBuffer
public void putCaptcha(Captcha captcha,
java.util.Locale locale)
putCaptcha in interface CaptchaBuffercaptcha - The captcha to addlocale - the locale of the captchapublic void putAllCaptcha(java.util.Collection captchas)
putAllCaptcha in interface CaptchaBuffercaptchas - The captchas to add
public void putAllCaptcha(java.util.Collection captchas,
java.util.Locale locale)
putAllCaptcha in interface CaptchaBuffercaptchas - The captchas to addlocale - The locale of the captchaspublic int size()
size in interface CaptchaBufferpublic int size(java.util.Locale locale)
size in interface CaptchaBufferlocale - the locale to get the size
public void dispose()
dispose in interface CaptchaBufferpublic void clear()
clear in interface CaptchaBufferpublic java.util.Collection getLocales()
getLocales in interface CaptchaBuffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||