public class DefaultCaptchaManager extends Object implements CaptchaManager, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Category |
log
Deprecated.
since 5.5, use private logger
|
Constructor and Description |
---|
DefaultCaptchaManager() |
Modifier and Type | Method and Description |
---|---|
Collection |
addCaptchaGroups(Collection groupList)
Method adds a Collection of group names to the existing groups for the captcha group setting.
|
void |
afterPropertiesSet() |
void |
destroy() |
void |
excludeGroups() |
void |
excludeNone() |
void |
excludeRegisteredUsers() |
String |
generateCaptchaId() |
String |
getExclude() |
com.octo.captcha.service.image.ImageCaptchaService |
getImageCaptchaService() |
UserAccessor |
getUserAccessor() |
boolean |
isCaptchaAvailable() |
boolean |
isCaptchaEnabled() |
boolean |
isDebugEnabled() |
void |
removeCaptchaGroup(String group)
Removes a group from the list of captcha groups
|
void |
setCaptchaEnabled(boolean value) |
void |
setCaptchaEngineClassName(String captchaEngineClassName) |
void |
setCaptchaGroups(Collection groupList) |
void |
setCaptchaStore(com.octo.captcha.service.captchastore.CaptchaStore captchaStore) |
void |
setDebugMode(boolean value)
If true the captcha manager will accept "DEBUG" for every generated capthca and reject
all other tokens.
|
void |
setExclude(String value) |
void |
setImageCaptchaService(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService) |
void |
setSettingsManager(SettingsManager settingsManager) |
void |
setUserAccessor(UserAccessor userAccessor) |
boolean |
showCaptchaForCurrentUser()
Determines whether a capture has to be shown for the currently logged in users
|
boolean |
validateCaptcha(String captchaId,
String captchaResponse)
validate captcha response
|
@Deprecated public static final org.apache.log4j.Category log
public void setCaptchaStore(com.octo.captcha.service.captchastore.CaptchaStore captchaStore)
public void setCaptchaEngineClassName(String captchaEngineClassName)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public boolean isCaptchaAvailable()
isCaptchaAvailable
in interface CaptchaManager
public boolean validateCaptcha(String captchaId, String captchaResponse)
CaptchaManager
validateCaptcha
in interface CaptchaManager
public boolean isCaptchaEnabled()
isCaptchaEnabled
in interface CaptchaManager
public void setCaptchaEnabled(boolean value)
setCaptchaEnabled
in interface CaptchaManager
public boolean isDebugEnabled()
isDebugEnabled
in interface CaptchaManager
public void setDebugMode(boolean value)
CaptchaManager
setDebugMode
in interface CaptchaManager
public void excludeNone()
excludeNone
in interface CaptchaManager
public void excludeRegisteredUsers()
excludeRegisteredUsers
in interface CaptchaManager
public void excludeGroups()
excludeGroups
in interface CaptchaManager
public String getExclude()
getExclude
in interface CaptchaManager
public void setExclude(String value)
setExclude
in interface CaptchaManager
public void setCaptchaGroups(Collection groupList)
setCaptchaGroups
in interface CaptchaManager
public Collection addCaptchaGroups(Collection groupList)
CaptchaManager
addCaptchaGroups
in interface CaptchaManager
groupList
- Collection of group namespublic void removeCaptchaGroup(String group)
CaptchaManager
removeCaptchaGroup
in interface CaptchaManager
group
- Stringpublic boolean showCaptchaForCurrentUser()
CaptchaManager
showCaptchaForCurrentUser
in interface CaptchaManager
public void setSettingsManager(SettingsManager settingsManager)
public UserAccessor getUserAccessor()
public void setUserAccessor(UserAccessor userAccessor)
public void setImageCaptchaService(com.octo.captcha.service.image.ImageCaptchaService imageCaptchaService)
setImageCaptchaService
in interface CaptchaManager
public com.octo.captcha.service.image.ImageCaptchaService getImageCaptchaService()
getImageCaptchaService
in interface CaptchaManager
public String generateCaptchaId()
generateCaptchaId
in interface CaptchaManager
Copyright © 2003–2015 Atlassian. All rights reserved.