001 /**
002 * Copyright 2005-2013 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 */
016 package org.kuali.rice.krad.datadictionary.validation.constraint;
017
018 import org.kuali.rice.core.api.uif.DataType;
019
020 import java.io.Serializable;
021 import java.util.ArrayList;
022
023 /**
024 * This class is a direct copy of one that was in Kuali Student. Look up constraints are currently not implemented.
025 *
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 * @since 1.1
028 */
029 public class CommonLookupParam implements Serializable {
030 private static final long serialVersionUID = 1L;
031
032 private String key;
033 private CommonLookup childLookup;
034 private WriteAccess writeAccess;
035 private DataType dataType;
036 private boolean optional;
037
038 private ArrayList<String> defaultValueList;
039 private String defaultValueString;
040
041 private String name;
042 private String desc;
043 private boolean caseSensitive;
044 private Usage usage;
045 protected String fieldPath;
046
047 public enum Widget {
048 SUGGEST_BOX, DROPDOWN_LIST, RADIO_BUTTONS, CHECK_BOXES, TEXT_BOX, CALENDAR, PICKER
049 }
050
051 public enum WriteAccess {
052 ON_CREATE, /* must also be required */
053 ALWAYS, NEVER, WHEN_NULL, REQUIRED
054 }
055
056 public enum Usage {
057 DEFAULT, ADVANCED, CUSTOM, ADVANCED_CUSTOM
058 }
059
060 private Widget widget;
061
062 public String getKey() {
063 return key;
064 }
065
066 public void setKey(String key) {
067 this.key = key;
068 }
069
070 public CommonLookup getChildLookup() {
071 return childLookup;
072 }
073
074 public void setChildLookup(CommonLookup childLookup) {
075 this.childLookup = childLookup;
076 }
077
078 public WriteAccess getWriteAccess() {
079 return writeAccess;
080 }
081
082 public void setWriteAccess(WriteAccess writeAccess) {
083 this.writeAccess = writeAccess;
084 }
085
086 public DataType getDataType() {
087 return dataType;
088 }
089
090 public void setDataType(DataType dataType) {
091 this.dataType = dataType;
092 }
093
094 public boolean isOptional() {
095 return optional;
096 }
097
098 public void setOptional(boolean optional) {
099 this.optional = optional;
100 }
101
102 public ArrayList<String> getDefaultValueList() {
103 return defaultValueList;
104 }
105
106 public void setDefaultValueList(ArrayList<String> defaultValueList) {
107 this.defaultValueList = defaultValueList;
108 }
109
110 public String getDefaultValueString() {
111 return defaultValueString;
112 }
113
114 public void setDefaultValueString(String defaultValueString) {
115 this.defaultValueString = defaultValueString;
116 }
117
118 public String getName() {
119 return name;
120 }
121
122 public void setName(String name) {
123 this.name = name;
124 }
125
126 public String getDesc() {
127 return desc;
128 }
129
130 public void setDesc(String desc) {
131 this.desc = desc;
132 }
133
134 public boolean isCaseSensitive() {
135 return caseSensitive;
136 }
137
138 public void setCaseSensitive(boolean caseSensitive) {
139 this.caseSensitive = caseSensitive;
140 }
141
142 public Usage getUsage() {
143 return usage;
144 }
145
146 public void setUsage(Usage usage) {
147 this.usage = usage;
148 }
149
150 public String getFieldPath() {
151 return fieldPath;
152 }
153
154 public void setFieldPath(String fieldPath) {
155 this.fieldPath = fieldPath;
156 }
157
158 public Widget getWidget() {
159 return widget;
160 }
161
162 public void setWidget(Widget widget) {
163 this.widget = widget;
164 }
165 }