001/**
002 * Copyright 2010 The Kuali Foundation Licensed under the
003 * Educational Community License, Version 2.0 (the "License"); you may
004 * not use this file except in compliance with the License. You may
005 * obtain a copy of the License at
006 *
007 * http://www.osedu.org/licenses/ECL-2.0
008 *
009 * Unless required by applicable law or agreed to in writing,
010 * software distributed under the License is distributed on an "AS IS"
011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing
013 * permissions and limitations under the License.
014 */
015
016package org.kuali.student.r1.common.assembly.data;
017
018import java.io.Serializable;
019import java.util.ArrayList;
020
021import org.kuali.student.r1.common.assembly.data.LookupMetadata.Usage;
022import org.kuali.student.r1.common.assembly.data.Metadata.WriteAccess;
023
024
025public class LookupParamMetadata implements Serializable {
026
027    private static final long serialVersionUID = 1L;
028    
029    private String key;
030    private LookupMetadata childLookup;    
031    private Metadata.WriteAccess writeAccess;    
032    private Data.DataType dataType;    
033    private boolean optional;
034    
035    private ArrayList<String> defaultValueList;
036    private String defaultValueString;
037    private String fieldPath;
038    
039    private String name;      
040    private String desc;    
041    private boolean caseSensitive;
042    private Usage usage;
043
044    //TODO none of these are used
045    public enum Widget {
046        SUGGEST_BOX, DROPDOWN_LIST, RADIO_BUTTONS, CHECK_BOXES, TEXT_BOX, CALENDAR, PICKER
047    }
048
049    private Widget widget;
050
051    public LookupMetadata getChildLookup() {
052        return childLookup;
053    }
054
055    public void setChildLookup(LookupMetadata childLookup) {
056        this.childLookup = childLookup;
057    }
058
059    public Usage getUsage() {
060        return usage;
061    }
062
063    public void setUsage(Usage usage) {
064        this.usage = usage;
065    }
066
067    public Widget getWidget() {
068        return widget;
069    }
070
071    public void setWidget(Widget widget) {
072        this.widget = widget;
073    }
074
075    public String getKey() {
076        return key;
077    }
078
079    public void setKey(String key) {
080        this.key = key;
081    }
082
083    public boolean isOptional() {
084        return optional;
085    }
086
087    public void setOptional(boolean optional) {
088        this.optional = optional;
089    }
090
091    public Data.DataType getDataType() {
092        return dataType;
093    }
094
095    public void setDataType(Data.DataType dataType) {
096        this.dataType = dataType;
097    }
098
099    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}