1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.common.assembly.data; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.ArrayList; |
20 | |
|
21 | |
import org.kuali.student.common.assembly.data.LookupMetadata.Usage; |
22 | |
import org.kuali.student.common.assembly.data.Metadata.WriteAccess; |
23 | |
|
24 | |
|
25 | 79 | public class LookupParamMetadata implements Serializable { |
26 | |
|
27 | |
private static final long serialVersionUID = 1L; |
28 | |
|
29 | |
private String key; |
30 | |
private LookupMetadata childLookup; |
31 | |
private Metadata.WriteAccess writeAccess; |
32 | |
private Data.DataType dataType; |
33 | |
private boolean optional; |
34 | |
|
35 | |
private ArrayList<String> defaultValueList; |
36 | |
private String defaultValueString; |
37 | |
private String fieldPath; |
38 | |
|
39 | |
private String name; |
40 | |
private String desc; |
41 | |
private boolean caseSensitive; |
42 | |
private Usage usage; |
43 | |
|
44 | |
|
45 | 8 | public enum Widget { |
46 | 1 | SUGGEST_BOX, DROPDOWN_LIST, RADIO_BUTTONS, CHECK_BOXES, TEXT_BOX, CALENDAR, PICKER |
47 | |
} |
48 | |
|
49 | |
private Widget widget; |
50 | |
|
51 | |
public LookupMetadata getChildLookup() { |
52 | 0 | return childLookup; |
53 | |
} |
54 | |
|
55 | |
public void setChildLookup(LookupMetadata childLookup) { |
56 | 0 | this.childLookup = childLookup; |
57 | 0 | } |
58 | |
|
59 | |
public Usage getUsage() { |
60 | 0 | return usage; |
61 | |
} |
62 | |
|
63 | |
public void setUsage(Usage usage) { |
64 | 20 | this.usage = usage; |
65 | 20 | } |
66 | |
|
67 | |
public Widget getWidget() { |
68 | 0 | return widget; |
69 | |
} |
70 | |
|
71 | |
public void setWidget(Widget widget) { |
72 | 18 | this.widget = widget; |
73 | 18 | } |
74 | |
|
75 | |
public String getKey() { |
76 | 0 | return key; |
77 | |
} |
78 | |
|
79 | |
public void setKey(String key) { |
80 | 79 | this.key = key; |
81 | 79 | } |
82 | |
|
83 | |
public boolean isOptional() { |
84 | 0 | return optional; |
85 | |
} |
86 | |
|
87 | |
public void setOptional(boolean optional) { |
88 | 79 | this.optional = optional; |
89 | 79 | } |
90 | |
|
91 | |
public Data.DataType getDataType() { |
92 | 2 | return dataType; |
93 | |
} |
94 | |
|
95 | |
public void setDataType(Data.DataType dataType) { |
96 | 79 | this.dataType = dataType; |
97 | 79 | } |
98 | |
|
99 | |
public WriteAccess getWriteAccess() { |
100 | 18 | return writeAccess; |
101 | |
} |
102 | |
|
103 | |
public void setWriteAccess(WriteAccess writeAccess) { |
104 | 69 | this.writeAccess = writeAccess; |
105 | 69 | } |
106 | |
|
107 | |
public String getName() { |
108 | 2 | return name; |
109 | |
} |
110 | |
|
111 | |
public void setName(String name) { |
112 | 79 | this.name = name; |
113 | 79 | } |
114 | |
|
115 | |
public String getDesc() { |
116 | 0 | return desc; |
117 | |
} |
118 | |
|
119 | |
public void setDesc(String desc) { |
120 | 79 | this.desc = desc; |
121 | 79 | } |
122 | |
|
123 | |
|
124 | |
public boolean isCaseSensitive() { |
125 | 0 | return caseSensitive; |
126 | |
} |
127 | |
|
128 | |
public void setCaseSensitive(boolean caseSensitive) { |
129 | 79 | this.caseSensitive = caseSensitive; |
130 | 79 | } |
131 | |
|
132 | |
@Override |
133 | |
public String toString() { |
134 | 0 | return "LookupParamMetadata[key=" + key + ", name=" + name |
135 | |
+ ", caseSensitive=" + caseSensitive + ", childLookup=" |
136 | |
+ childLookup + ", dataType=" + dataType + ", defaultValue=" |
137 | |
+ defaultValueList==null?defaultValueString:defaultValueList.toString() + ", optional=" + optional + ", usage=" + usage |
138 | |
+ ", widget=" + widget + ", writeAccess=" + writeAccess + "]"; |
139 | |
} |
140 | |
|
141 | |
public ArrayList<String> getDefaultValueList() { |
142 | 10 | return defaultValueList; |
143 | |
} |
144 | |
|
145 | |
public void setDefaultValueList(ArrayList<String> defaultValueList) { |
146 | 50 | this.defaultValueList = defaultValueList; |
147 | 50 | } |
148 | |
|
149 | |
public String getDefaultValueString() { |
150 | 14 | return defaultValueString; |
151 | |
} |
152 | |
|
153 | |
public void setDefaultValueString(String defaultValueString) { |
154 | 50 | this.defaultValueString = defaultValueString; |
155 | 50 | } |
156 | |
|
157 | |
public String getFieldPath() { |
158 | 0 | return fieldPath; |
159 | |
} |
160 | |
|
161 | |
public void setFieldPath(String fieldPath) { |
162 | 50 | this.fieldPath = fieldPath; |
163 | 50 | } |
164 | |
} |