1 /**
2 * Copyright 2005-2012 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krad.datadictionary.validation.constraint;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import javax.xml.bind.annotation.XmlAccessType;
22 import javax.xml.bind.annotation.XmlAccessorType;
23 import javax.xml.bind.annotation.XmlElement;
24
25 /**
26 * This is a constraint that limits attribute values to some subset of valid characters or to match a particular regular expression.
27 *
28 * For example:
29 * - To limit to both upper and lower-case letters, value can be set to "[A-Za-z]*"
30 * - To limit to any character except carriage returns and line feeds, value can be set to "[^\n\r]*"
31 *
32 *
33 * @author Kuali Student Team
34 * @since 1.1
35 */
36 @XmlAccessorType(XmlAccessType.FIELD)
37 public class ValidCharactersConstraint extends BaseConstraint {
38
39 @XmlElement
40 protected String value;
41
42 /**
43 * The Java based regex for valid characters
44 * This value should include the ^ and $ symbols if needed
45 * @return the value
46 */
47 public String getValue() {
48 return value;
49 }
50
51 /**
52 * @param value the value to set
53 */
54 public void setValue(String value) {
55 this.value = value;
56 }
57
58
59 }