| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| BaseConstraint | 
  | 
  | 1.0;1 | 
| 1 |  package org.kuali.rice.kns.datadictionary.validation.constraint; | |
| 2 | ||
| 3 |  import javax.xml.bind.annotation.XmlAccessType; | |
| 4 |  import javax.xml.bind.annotation.XmlAccessorType; | |
| 5 |  import javax.xml.bind.annotation.XmlElement; | |
| 6 | ||
| 7 | ||
| 8 |  /** | |
| 9 |   * A class that implements the required accessor for label keys. This provides a convenient base class | |
| 10 |   * from which other constraints can be derived. | |
| 11 |   *  | |
| 12 |   * This class is a direct copy of one that was in Kuali Student.  | |
| 13 |   *  | |
| 14 |   * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 15 |   * @since 1.1 | |
| 16 |   */ | |
| 17 | @XmlAccessorType(XmlAccessType.FIELD)  | |
| 18 | public class BaseConstraint implements Constraint {  | |
| 19 | @XmlElement  | |
| 20 |      protected String labelKey;  | |
| 21 | @XmlElement  | |
| 22 |      protected Boolean applyClientSide; | |
| 23 | ||
| 24 | 0 |      public BaseConstraint(){ | 
| 25 | 0 |              applyClientSide = Boolean.valueOf(true); | 
| 26 | 0 |      } | 
| 27 | ||
| 28 |          /** | |
| 29 |           * LabelKey should be a single word key.  This key is used to find a message to use for this | |
| 30 |           * constraint from available messages.  The key is also used for defining/retrieving validation method | |
| 31 |           * names when applicable for ValidCharactersContraints. | |
| 32 |           *  | |
| 33 |           * If a comma separated list of keys is used, a message will be generated that is a comma separated list of | |
| 34 |           * the messages retrieved for each key. | |
| 35 |           *  | |
| 36 |           * @see ValidCharactersConstraint | |
| 37 |           *  | |
| 38 |           * @return | |
| 39 |           */ | |
| 40 |          public String getLabelKey() { | |
| 41 | 0 |                  return labelKey; | 
| 42 | }  | |
| 43 | ||
| 44 | public void setLabelKey(String labelKey) {  | |
| 45 | 0 |                  this.labelKey = labelKey; | 
| 46 | 0 |          } | 
| 47 | ||
| 48 |          /** | |
| 49 |           * If this is true, the constraint should be applied on the client side when the user interacts with | |
| 50 |           * a field - if this constraint can be interpreted for client side use. Default is true. | |
| 51 |           * @return the applyClientSide | |
| 52 |           */ | |
| 53 |          public Boolean getApplyClientSide() { | |
| 54 | 0 |                  return this.applyClientSide; | 
| 55 | }  | |
| 56 | ||
| 57 |          /** | |
| 58 |           * @param applyClientSide the applyClientSide to set | |
| 59 |           */ | |
| 60 | public void setApplyClientSide(Boolean applyClientSide) {  | |
| 61 | 0 |                  this.applyClientSide = applyClientSide; | 
| 62 | 0 |          } | 
| 63 | ||
| 64 | ||
| 65 | }  |