001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.datadictionary.validation.constraint; 017 018import java.util.ArrayList; 019import java.util.List; 020 021import javax.xml.bind.annotation.XmlAccessType; 022import javax.xml.bind.annotation.XmlAccessorType; 023import javax.xml.bind.annotation.XmlElement; 024 025/** 026 * This is a constraint that limits attribute values to some subset of valid characters or to match a particular regular expression. 027 * 028 * For example: 029 * - To limit to both upper and lower-case letters, value can be set to "[A-Za-z]*" 030 * - To limit to any character except carriage returns and line feeds, value can be set to "[^\n\r]*" 031 * 032 * 033 * @author Kuali Student Team 034 * @since 1.1 035 */ 036@XmlAccessorType(XmlAccessType.FIELD) 037public class ValidCharactersConstraint extends BaseConstraint { 038 039 @XmlElement 040 protected String value; 041 042 /** 043 * The Java based regex for valid characters 044 * This value should include the ^ and $ symbols if needed 045 * @return the value 046 */ 047 public String getValue() { 048 return value; 049 } 050 051 /** 052 * @param value the value to set 053 */ 054 public void setValue(String value) { 055 this.value = value; 056 } 057 058 059}