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 String
display()
String
display(Map<String,Object> parameters)
protected org.slf4j.Logger
getLogger()
boolean
isValid()
boolean
isValid(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
- theCaptcha
to 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:
display
in interfaceCaptcha
- Returns:
- the displayed wrapped CAPTCHA or
null
in case of an exception - See Also:
Captcha.display()
-
display
public String display(Map<String,Object> parameters)
- Specified by:
display
in interfaceCaptcha
- Parameters:
parameters
- the CAPTCHA override parameters- Returns:
- the displayed wrapped CAPTCHA or
null
in case of an exception - See Also:
Captcha.display(Map)
-
isValid
public boolean isValid()
- Specified by:
isValid
in interfaceCaptcha
- Returns:
true
if the answer is valid;false
otherwise or if an exception occurs- See Also:
Captcha.isValid()
-
-