Coverage Report - pt.digitalis.dif.dem.objects.parameters.rules.ParameterRuleResult
 
Classes in this File Line Coverage Branch Coverage Complexity
ParameterRuleResult
0%
0/15
N/A
1
 
 1  0
 /** 2008, Digitalis Informatica. All rights reserved.
 2  
  *
 3  
  * Distribuicao e Gestao de Informatica, Lda.
 4  
  * Estrada de Paco de Arcos num.9 - Piso -1
 5  
  * 2780-666 Paco de Arcos
 6  
  * Telefone: (351) 21 4408990
 7  
  * Fax: (351) 21 4408999
 8  
  * http://www.digitalis.pt
 9  
  */
 10  
 
 11  
 package pt.digitalis.dif.dem.objects.parameters.rules;
 12  
 
 13  
 
 14  
 /**
 15  
  * Result of a parameter rule validation
 16  
  *
 17  
  * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a><br/>
 18  
  * @created Mar 31, 2009
 19  
  */
 20  
 public class ParameterRuleResult {
 21  
 
 22  
     /** The error message if the rule was not valid */
 23  
     private String errorMessage;
 24  
 
 25  
     /** T if the ruke was validated successfully */
 26  
     private boolean valid;
 27  
 
 28  
 
 29  
     /**
 30  
      * @param valid
 31  
      */
 32  0
     public ParameterRuleResult(boolean valid)
 33  
     {
 34  0
         this.valid = valid;
 35  0
         this.errorMessage = null;
 36  0
     }
 37  
 
 38  
 
 39  
     /**
 40  
      * @param errorMessage
 41  
      */
 42  0
     public ParameterRuleResult(String errorMessage)
 43  
     {
 44  0
         this.valid = false;
 45  0
         this.errorMessage = errorMessage;
 46  0
     }
 47  
 
 48  
 
 49  
     /**
 50  
      * Inspector for the 'errorMessage' attribute.
 51  
      *
 52  
      * @return the errorMessage value
 53  
      */
 54  
     public String getErrorMessage()
 55  
     {
 56  0
         return errorMessage;
 57  
     }
 58  
 
 59  
 
 60  
     /**
 61  
      * Inspector for the 'valid' attribute.
 62  
      *
 63  
      * @return the valid value
 64  
      */
 65  
     public boolean isValid()
 66  
     {
 67  0
         return valid;
 68  
     }
 69  
 
 70  
 
 71  
     /**
 72  
      * Modifier for the 'errorMessage' attribute.
 73  
      *
 74  
      * @param errorMessage the new errorMessage value to set
 75  
      */
 76  
     public void setErrorMessage(String errorMessage)
 77  
     {
 78  0
         this.errorMessage = errorMessage;
 79  0
     }
 80  
 
 81  
 
 82  
     /**
 83  
      * Modifier for the 'valid' attribute.
 84  
      *
 85  
      * @param valid the new valid value to set
 86  
      */
 87  
     public void setValid(boolean valid)
 88  
     {
 89  0
         this.valid = valid;
 90  0
     }
 91  
 }