View Javadoc

1   /**
2    * Copyright 2005-2013 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 org.kuali.rice.core.api.uif.DataType;
19  
20  import java.io.Serializable;
21  import java.util.ArrayList;
22  
23  /**
24   * This class is a direct copy of one that was in Kuali Student. Look up constraints are currently not implemented.
25   *
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   * @since 1.1
28   */
29  public class CommonLookupParam implements Serializable {
30      private static final long serialVersionUID = 1L;
31  
32      private String key;
33      private CommonLookup childLookup;
34      private WriteAccess writeAccess;
35      private DataType dataType;
36      private boolean optional;
37  
38      private ArrayList<String> defaultValueList;
39      private String defaultValueString;
40  
41      private String name;
42      private String desc;
43      private boolean caseSensitive;
44      private Usage usage;
45      protected String fieldPath;
46  
47      public enum Widget {
48          SUGGEST_BOX, DROPDOWN_LIST, RADIO_BUTTONS, CHECK_BOXES, TEXT_BOX, CALENDAR, PICKER
49      }
50  
51      public enum WriteAccess {
52          ON_CREATE, /* must also be required */
53          ALWAYS, NEVER, WHEN_NULL, REQUIRED
54      }
55  
56      public enum Usage {
57          DEFAULT, ADVANCED, CUSTOM, ADVANCED_CUSTOM
58      }
59  
60      private Widget widget;
61  
62      public String getKey() {
63          return key;
64      }
65  
66      public void setKey(String key) {
67          this.key = key;
68      }
69  
70      public CommonLookup getChildLookup() {
71          return childLookup;
72      }
73  
74      public void setChildLookup(CommonLookup childLookup) {
75          this.childLookup = childLookup;
76      }
77  
78      public WriteAccess getWriteAccess() {
79          return writeAccess;
80      }
81  
82      public void setWriteAccess(WriteAccess writeAccess) {
83          this.writeAccess = writeAccess;
84      }
85  
86      public DataType getDataType() {
87          return dataType;
88      }
89  
90      public void setDataType(DataType dataType) {
91          this.dataType = dataType;
92      }
93  
94      public boolean isOptional() {
95          return optional;
96      }
97  
98      public void setOptional(boolean optional) {
99          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 }