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