001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.datadictionary.validation.constraint; 017 018import org.kuali.rice.core.api.uif.DataType; 019 020import java.io.Serializable; 021import java.util.ArrayList; 022 023 024/** 025 * This class is a direct copy of one that was in Kuali Student. Look up constraints are currently not implemented. 026 * 027 * @author Kuali Rice Team (rice.collab@kuali.org) 028 * @since 1.1 029 */ 030public class CommonLookupParam implements Serializable { 031 032 033 private static final long serialVersionUID = 1L; 034 private String key; 035 private CommonLookup childLookup; 036 private WriteAccess writeAccess; 037 private DataType dataType; 038 private boolean optional; 039 040 private ArrayList<String> defaultValueList; 041 private String defaultValueString; 042 043 private String name; 044 private String desc; 045 private boolean caseSensitive; 046 private Usage usage; 047 protected String fieldPath; 048 049 050 public enum Widget { 051 SUGGEST_BOX, DROPDOWN_LIST, RADIO_BUTTONS, CHECK_BOXES, TEXT_BOX, CALENDAR, PICKER 052 } 053 054 public enum WriteAccess { 055 ON_CREATE, /* must also be required */ 056 ALWAYS, NEVER, WHEN_NULL, REQUIRED 057 } 058 059 public enum Usage { 060 DEFAULT, ADVANCED, CUSTOM, ADVANCED_CUSTOM 061 } 062 private Widget widget; 063 064 public String getKey() { 065 return key; 066 } 067 068 public void setKey(String key) { 069 this.key = key; 070 } 071 072 public CommonLookup getChildLookup() { 073 return childLookup; 074 } 075 076 public void setChildLookup(CommonLookup childLookup) { 077 this.childLookup = childLookup; 078 } 079 080 public WriteAccess getWriteAccess() { 081 return writeAccess; 082 } 083 084 public void setWriteAccess(WriteAccess writeAccess) { 085 this.writeAccess = writeAccess; 086 } 087 088 public DataType getDataType() { 089 return dataType; 090 } 091 092 public void setDataType(DataType dataType) { 093 this.dataType = dataType; 094 } 095 096 public boolean isOptional() { 097 return optional; 098 } 099 100 public void setOptional(boolean optional) { 101 this.optional = optional; 102 } 103 104 public ArrayList<String> getDefaultValueList() { 105 return defaultValueList; 106 } 107 108 public void setDefaultValueList(ArrayList<String> defaultValueList) { 109 this.defaultValueList = defaultValueList; 110 } 111 112 public String getDefaultValueString() { 113 return defaultValueString; 114 } 115 116 public void setDefaultValueString(String defaultValueString) { 117 this.defaultValueString = defaultValueString; 118 } 119 120 public String getName() { 121 return name; 122 } 123 124 public void setName(String name) { 125 this.name = name; 126 } 127 128 public String getDesc() { 129 return desc; 130 } 131 132 public void setDesc(String desc) { 133 this.desc = desc; 134 } 135 136 public boolean isCaseSensitive() { 137 return caseSensitive; 138 } 139 140 public void setCaseSensitive(boolean caseSensitive) { 141 this.caseSensitive = caseSensitive; 142 } 143 144 public Usage getUsage() { 145 return usage; 146 } 147 148 public void setUsage(Usage usage) { 149 this.usage = usage; 150 } 151 152 public String getFieldPath() { 153 return fieldPath; 154 } 155 156 public void setFieldPath(String fieldPath) { 157 this.fieldPath = fieldPath; 158 } 159 160 public Widget getWidget() { 161 return widget; 162 } 163 164 public void setWidget(Widget widget) { 165 this.widget = widget; 166 } 167}