palio.modules
Class ReCaptcha

java.lang.Object
  extended by palio.modules.core.Module
      extended by palio.modules.ReCaptcha
All Implemented Interfaces:
palio.modules.core.CurrentModuleDataKeys

public class ReCaptcha
extends palio.modules.core.Module

reCAPTCHA is a freely available CAPTCHA implementation. It distinguishes humans from computers. This may be useful for a registration page for a forum or wiki or a comment form. http://recaptcha.net

To use this module you should first make these following steps (or use built jPALIO keys - then you don't need to make anything):

  1. Register and get reCaptcha keys from https://admin.recaptcha.net
  2. Write received keys to config file of instance like bellow
<instance>
   <module name="recaptcha">
      <PublicKey>XXXXXXXXXXXXXXX</PublicKey>
      <PrivateKey>XXXXXXXXXXXXXXX</PrivateKey>
</module>
</instance>

If you are behind firewall, see http://wiki.recaptcha.net/index.php/Firewalls_and_reCAPTCHA. Remember to add port 443 too.

This is standard module of jPALIO since 7.0.35.

Version:
1.0.3
Author:
Krzysztof Synowiec

Field Summary
 
Fields inherited from interface palio.modules.core.CurrentModuleDataKeys
DESIGNER_ACTIONS_BUFFER, HTML_FORM_BUILDER, HTML_MAP_BUILDER, HTML_MENU_BUILDER, HTML_TOOLTIPS_BUFFER, ITEXT_DOCUMENT, MAIL_MESSAGE, XLS_DOCUMENT, XML_DOCUMENT
 
Constructor Summary
ReCaptcha(palio.Instance instance, java.util.Properties parameters)
           
 
Method Summary
 java.lang.Boolean checkAnswer()
          Check answer given by the user.
 java.lang.Boolean checkAnswer(java.lang.String privateKey)
          Check answer given by the user.
 java.lang.String createHTML()
          Create standard HTML Dialog Box in client web browser.
 java.lang.String createHTML(java.lang.String errorMessage)
          Create standard HTML Dialog Box in client web browser.
 java.lang.String createHTML(java.lang.String publicKey, java.lang.String privateKey)
          Create HTML Dialog Box in client web browser.
 java.lang.String createHTML(java.lang.String publicKey, java.lang.String privateKey, java.lang.String errorMessage)
          Create HTML Dialog Box in client web browser.
 java.lang.String createHTML(java.lang.String errorMessage, java.lang.String theme, java.lang.String lang, java.lang.Long tabindex)
          Create HTML Dialog Box in client web browser.
 java.lang.String createHTML(java.lang.String publicKey, java.lang.String privateKey, java.lang.String errorMessage, java.lang.String theme, java.lang.String lang, java.lang.Long tabindex)
          Create HTML Dialog Box in client web browser.
 net.tanesha.recaptcha.ReCaptcha getReCaptchaInstance()
          Deprecated. Returns an instance of ReCaptcha object created for this module instance. NOT IMPLEMENTED.
 java.lang.String getVersion()
          Returns the module version
 
Methods inherited from class palio.modules.core.Module
getConfigParam, getDescription, getModuleTranslation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReCaptcha

public ReCaptcha(palio.Instance instance,
                 java.util.Properties parameters)
Parameters:
instance -
parameters -
Method Detail

createHTML

public java.lang.String createHTML(java.lang.String publicKey,
                                   java.lang.String privateKey,
                                   java.lang.String errorMessage)
Create HTML Dialog Box in client web browser. Use this methos if you have keys which you didn't write to instance's config file.

Parameters:
publicKey - reCaptcha public key
privateKey - reCaptcha private key
errorMessage - error message
Returns:
returns HTML Dialog Box
Since:
jPALIO 7.0.35

createHTML

public java.lang.String createHTML(java.lang.String publicKey,
                                   java.lang.String privateKey)
Create HTML Dialog Box in client web browser. Use this methos if you have keys which you didn't write to instance's config file.

Parameters:
publicKey - reCaptcha public key
privateKey - reCaptcha private key
Returns:
returns HTML Dialog Box
Since:
jPALIO 7.0.35

createHTML

public java.lang.String createHTML(java.lang.String publicKey,
                                   java.lang.String privateKey,
                                   java.lang.String errorMessage,
                                   java.lang.String theme,
                                   java.lang.String lang,
                                   java.lang.Long tabindex)
Create HTML Dialog Box in client web browser. Use this methos if you have keys which you didn't write to instance's config file.

Parameters:
publicKey - reCaptcha public key
privateKey - reCaptcha private key
errorMessage - error message
theme - theme, you can use: "white" (default theme), "red", "blackglass", "clean"
lang - Langualge like "en", "de", "pl" (default language of instance_
tabindex - Sets a tabindex for the reCAPTCHA text box. If other elements in the form use a tabindex, this should be set so that navigation is easier for the user. Default tabindex is 0.
Returns:
returns HTML Dialog Box
Since:
jPALIO 7.0.35

createHTML

public java.lang.String createHTML(java.lang.String errorMessage,
                                   java.lang.String theme,
                                   java.lang.String lang,
                                   java.lang.Long tabindex)
Create HTML Dialog Box in client web browser. Use this methos if you have keys which you didn't write to instance's config file.

Parameters:
publicKey - reCaptcha public key
privateKey - reCaptcha private key
errorMessage - error message
theme - theme, you can use: "white" (default theme), "red", "blackglass", "clean"
lang - Langualge like "en", "de", "pl" (default language of instance_
tabindex - Sets a tabindex for the reCAPTCHA text box. If other elements in the form use a tabindex, this should be set so that navigation is easier for the user. Default tabindex is 0.
Returns:
returns HTML Dialog Box
Since:
jPALIO 7.0.35

createHTML

public java.lang.String createHTML(java.lang.String errorMessage)
Create standard HTML Dialog Box in client web browser.

Parameters:
errorMessage - error message
Returns:
returns HTML Dialog Box
Since:
jPALIO 7.0.35

createHTML

public java.lang.String createHTML()
Create standard HTML Dialog Box in client web browser.

Returns:
returns HTML Dialog Box
Since:
jPALIO 7.0.35

checkAnswer

public java.lang.Boolean checkAnswer(java.lang.String privateKey)
Check answer given by the user. Use this methos if you have keys which you didn't write to instance's config file.

Parameters:
privateKey - reCaptcha private key
Returns:
true if the client wrote write answer
Since:
jPALIO 7.0.35

checkAnswer

public java.lang.Boolean checkAnswer()
Check answer given by the user.

Returns:
true if the client wrote write answer
Since:
jPALIO 7.0.35

getReCaptchaInstance

@Deprecated
public net.tanesha.recaptcha.ReCaptcha getReCaptchaInstance()
Deprecated. Returns an instance of ReCaptcha object created for this module instance. NOT IMPLEMENTED.

Since:
jPALIO 7.4.65, module 1.0.1

getVersion

public java.lang.String getVersion()
Description copied from class: palio.modules.core.Module
Returns the module version

Specified by:
getVersion in class palio.modules.core.Module