Class CacheBackedCaptchaStore
- java.lang.Object
-
- com.atlassian.confluence.impl.security.login.CacheBackedCaptchaStore
-
- All Implemented Interfaces:
com.octo.captcha.service.captchastore.CaptchaStore
public class CacheBackedCaptchaStore extends Object implements com.octo.captcha.service.captchastore.CaptchaStore
An implementation of CaptchaStore that stores captchas in Confluence's cache.- Since:
- 8.0
-
-
Constructor Summary
Constructors Constructor Description CacheBackedCaptchaStore(com.atlassian.cache.CacheFactory cacheFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanAndShutdown()
void
empty()
com.octo.captcha.Captcha
getCaptcha(String id)
Collection
getKeys()
Locale
getLocale(String id)
int
getSize()
boolean
hasCaptcha(String id)
void
initAndStart()
boolean
removeCaptcha(String id)
void
storeCaptcha(String id, com.octo.captcha.Captcha captcha)
void
storeCaptcha(String id, com.octo.captcha.Captcha captcha, Locale locale)
-
-
-
Method Detail
-
hasCaptcha
public boolean hasCaptcha(String id)
- Specified by:
hasCaptcha
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
-
storeCaptcha
public void storeCaptcha(String id, com.octo.captcha.Captcha captcha) throws com.octo.captcha.service.CaptchaServiceException
- Specified by:
storeCaptcha
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
- Throws:
com.octo.captcha.service.CaptchaServiceException
-
storeCaptcha
public void storeCaptcha(String id, com.octo.captcha.Captcha captcha, Locale locale) throws com.octo.captcha.service.CaptchaServiceException
- Specified by:
storeCaptcha
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
- Throws:
com.octo.captcha.service.CaptchaServiceException
-
getCaptcha
public com.octo.captcha.Captcha getCaptcha(String id) throws com.octo.captcha.service.CaptchaServiceException
- Specified by:
getCaptcha
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
- Throws:
com.octo.captcha.service.CaptchaServiceException
-
getLocale
public Locale getLocale(String id) throws com.octo.captcha.service.CaptchaServiceException
- Specified by:
getLocale
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
- Throws:
com.octo.captcha.service.CaptchaServiceException
-
removeCaptcha
public boolean removeCaptcha(String id)
- Specified by:
removeCaptcha
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
-
getSize
public int getSize()
- Specified by:
getSize
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
-
getKeys
public Collection getKeys()
- Specified by:
getKeys
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
-
empty
public void empty()
- Specified by:
empty
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
-
initAndStart
public void initAndStart()
- Specified by:
initAndStart
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
-
cleanAndShutdown
public void cleanAndShutdown()
- Specified by:
cleanAndShutdown
in interfacecom.octo.captcha.service.captchastore.CaptchaStore
-
-