Package org.xwiki.captcha.script
Class WrappedScriptCaptcha
- java.lang.Object
-
- org.xwiki.script.wrap.AbstractWrappingObject<T>
-
- org.xwiki.script.internal.safe.AbstractSafeObject<Captcha>
-
- org.xwiki.captcha.script.WrappedScriptCaptcha
-
-
Constructor Summary
Constructors Constructor Description WrappedScriptCaptcha(Captcha captcha, org.xwiki.script.internal.safe.ScriptSafeProvider<Captcha> safeProvider, org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdisplay()Stringdisplay(Map<String,Object> parameters)protected org.slf4j.LoggergetLogger()booleanisValid()booleanisValid(Map<String,Object> parameters)
-
-
-
Constructor Detail
-
WrappedScriptCaptcha
public WrappedScriptCaptcha(Captcha captcha, org.xwiki.script.internal.safe.ScriptSafeProvider<Captcha> safeProvider, org.slf4j.Logger logger)
- Parameters:
captcha- theCaptchato wrap for Script API accesssafeProvider- the provider making the conversion to the safe versionlogger- the logging component
-
-
Method Detail
-
getLogger
protected org.slf4j.Logger getLogger()
-
display
public String display()
- Specified by:
displayin interfaceCaptcha- Returns:
- the displayed wrapped CAPTCHA or
nullin case of an exception - See Also:
Captcha.display()
-
display
public String display(Map<String,Object> parameters)
- Specified by:
displayin interfaceCaptcha- Parameters:
parameters- the CAPTCHA override parameters- Returns:
- the displayed wrapped CAPTCHA or
nullin case of an exception - See Also:
Captcha.display(Map)
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceCaptcha- Returns:
trueif the answer is valid;falseotherwise or if an exception occurs- See Also:
Captcha.isValid()
-
-