Coverage Report - org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
 
Classes in this File Line Coverage Branch Coverage Complexity
ValidCharactersConstraint
100%
4/4
N/A
1
 
 1  
 package org.kuali.rice.krad.datadictionary.validation.constraint;
 2  
 
 3  
 import java.util.ArrayList;
 4  
 import java.util.List;
 5  
 
 6  
 import javax.xml.bind.annotation.XmlAccessType;
 7  
 import javax.xml.bind.annotation.XmlAccessorType;
 8  
 import javax.xml.bind.annotation.XmlElement;
 9  
 
 10  
 /**
 11  
  * This is a constraint that limits attribute values to some subset of valid characters or to match a particular regular expression.
 12  
  * 
 13  
  * For example: 
 14  
  * - To limit to both upper and lower-case letters, value can be set to "[A-Za-z]*"
 15  
  * - To limit to any character except carriage returns and line feeds, value can be set to "[^\n\r]*"
 16  
  * 
 17  
  * 
 18  
  * @author Kuali Student Team
 19  
  * @since 1.1
 20  
  */
 21  
 @XmlAccessorType(XmlAccessType.FIELD)
 22  131
 public class ValidCharactersConstraint extends BaseConstraint {
 23  
 
 24  
     @XmlElement
 25  
     protected String value;
 26  
 
 27  
     /**
 28  
      * The Java based regex for valid characters
 29  
      * This value should include the ^ and $ symbols if needed
 30  
      * @return the value
 31  
      */
 32  
     public String getValue() {
 33  4
         return value;
 34  
     }
 35  
 
 36  
     /**
 37  
      * @param value the value to set
 38  
      */
 39  
     public void setValue(String value) {
 40  32
         this.value = value;
 41  32
     }
 42  
 
 43  
 
 44  
 }