Coverage Report - pt.digitalis.dif.utils.extensions.ICaptcha
 
Classes in this File Line Coverage Branch Coverage Complexity
ICaptcha
N/A
N/A
1
 
 1  
 /**
 2  
  * 2014, Digitalis Informatica. All rights reserved. Distribuicao e Gestao de Informatica, Lda. Estrada de Paco de Arcos
 3  
  * num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 http://www.digitalis.pt
 4  
  */
 5  
 
 6  
 package pt.digitalis.dif.utils.extensions;
 7  
 
 8  
 import pt.digitalis.dif.controller.interfaces.IDIFContext;
 9  
 
 10  
 /**
 11  
  * Defines the Captcha functionality. @see http://en.wikipedia.org/wiki/CAPTCHA
 12  
  * 
 13  
  * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a><br/>
 14  
  * @created 02/07/2014
 15  
  */
 16  
 public interface ICaptcha {
 17  
 
 18  
     /** The id of the parameter that has the captcha value */
 19  
     final static public String CAPTCHA_INPUT_ID = "captchaValue";
 20  
 
 21  
     /** The parameter that indicates that a captcha field is present. */
 22  
     final static public String CAPTCHA_PRESENT = "captcha_field_present";
 23  
 
 24  
     /**
 25  
      * Fetches the captcha required generated form the current stage context request
 26  
      * 
 27  
      * @param context
 28  
      *            the current stage instance context
 29  
      * @return the captcha required value
 30  
      */
 31  
     public String getCaptchaRequiredValue(IDIFContext context);
 32  
 
 33  
     /**
 34  
      * Fetches the captcha value form the current stage context request
 35  
      * 
 36  
      * @param context
 37  
      *            the current stage instance context
 38  
      * @return the captcha submited value
 39  
      */
 40  
     public String getCaptchaSubmitedValue(IDIFContext context);
 41  
 
 42  
     /**
 43  
      * Validates the submited captcha value
 44  
      * 
 45  
      * @param context
 46  
      *            the current stage instance context
 47  
      * @return true if the submited captcha value is valid
 48  
      */
 49  
     public boolean isCaptchaValueValid(IDIFContext context);
 50  
 }