View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
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  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      //TODO none of these are used
45      public enum Widget {
46          SUGGEST_BOX, DROPDOWN_LIST, RADIO_BUTTONS, CHECK_BOXES, TEXT_BOX, CALENDAR, PICKER
47      }
48  
49      private Widget widget;
50  
51      public LookupMetadata getChildLookup() {
52          return childLookup;
53      }
54  
55      public void setChildLookup(LookupMetadata childLookup) {
56          this.childLookup = childLookup;
57      }
58  
59      public Usage getUsage() {
60          return usage;
61      }
62  
63      public void setUsage(Usage usage) {
64          this.usage = usage;
65      }
66  
67      public Widget getWidget() {
68          return widget;
69      }
70  
71      public void setWidget(Widget widget) {
72          this.widget = widget;
73      }
74  
75      public String getKey() {
76          return key;
77      }
78  
79      public void setKey(String key) {
80          this.key = key;
81      }
82  
83      public boolean isOptional() {
84          return optional;
85      }
86  
87      public void setOptional(boolean optional) {
88          this.optional = optional;
89      }
90  
91      public Data.DataType getDataType() {
92          return dataType;
93      }
94  
95      public void setDataType(Data.DataType dataType) {
96          this.dataType = dataType;
97      }
98  
99      public WriteAccess getWriteAccess() {
100         return writeAccess;
101     }
102 
103     public void setWriteAccess(WriteAccess writeAccess) {
104         this.writeAccess = writeAccess;
105     }
106 
107     public String getName() {
108         return name;
109     }
110 
111     public void setName(String name) {
112         this.name = name;
113     }
114 
115     public String getDesc() {
116         return desc;
117     }
118 
119     public void setDesc(String desc) {
120         this.desc = desc;
121     }
122 
123 
124     public boolean isCaseSensitive() {
125         return caseSensitive;
126     }
127 
128     public void setCaseSensitive(boolean caseSensitive) {
129         this.caseSensitive = caseSensitive;
130     }
131 
132 	@Override
133 	public String toString() {
134 		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 		return defaultValueList;
143 	}
144 
145 	public void setDefaultValueList(ArrayList<String> defaultValueList) {
146 		this.defaultValueList = defaultValueList;
147 	}
148 
149 	public String getDefaultValueString() {
150 		return defaultValueString;
151 	}
152 
153 	public void setDefaultValueString(String defaultValueString) {
154 		this.defaultValueString = defaultValueString;
155 	}
156 	
157     public String getFieldPath() {
158 		return fieldPath;
159 	}
160 
161 	public void setFieldPath(String fieldPath) {
162 		this.fieldPath = fieldPath;
163 	}
164 }