So even if we make the xwiki-captcha component
API independent of any
environment, we'll have to write code that in the end is
environment-dependent in the component implementation.
We can have for example:
boolean validateCaptcha()
without any parameters and retrieve what we need in the EC, but
still we'll have to check what environment we are called from in the
implementation.
So if it can be made to use the EC it's best,
otherwise it should not
have request as parameter since any implementation can have the
Container object injected. If we prefer to pass a parameter (I'm
still
ambivalent about this, it would be better when used in non component
env for sure) then Container can be passed. Again that's if we cannot
make it indep of the env.
Just to be sure, the public API exposed by xwiki-captcha would be
generic and not tied to any captcha implementation right?
Yes (for now the method
above is all I have in mind for an API)
Jerome.
_______________________________________________
devs mailing list
devs(a)xwiki.org