| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| DocumentSearchField_DEPR |
|
| 0.0;0 |
| 1 | /* | |
| 2 | * Copyright 2007-2008 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.kew.docsearch; | |
| 17 | ||
| 18 | import org.kuali.rice.kns.web.ui.Field; | |
| 19 | ||
| 20 | import java.util.HashSet; | |
| 21 | import java.util.List; | |
| 22 | import java.util.Map; | |
| 23 | import java.util.HashMap; | |
| 24 | import java.util.Set; | |
| 25 | import org.kuali.rice.kew.engine.node.KeyValuePair; | |
| 26 | ||
| 27 | ||
| 28 | /** | |
| 29 | * This is a description of what this class does - jjhanso don't forget to fill this in. | |
| 30 | * | |
| 31 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 32 | * @deprecated | |
| 33 | */ | |
| 34 | 0 | public class DocumentSearchField_DEPR extends Field { |
| 35 | // public static final String MULTIBOX = "multibox"; | |
| 36 | // public static final String DATEPICKER = "datePicker"; | |
| 37 | // | |
| 38 | // private static final Boolean DEFAULT_ALLOW_WILDCARD_VALUE = Boolean.TRUE; | |
| 39 | // private static final Boolean DEFAULT_AUTO_WILDCARD_BEGINNING_VALUE = Boolean.FALSE; | |
| 40 | // private static final Boolean DEFAULT_AUTO_WILDCARD_ENDING_VALUE = Boolean.FALSE; | |
| 41 | // private static final Boolean DEFAULT_CASE_SENSITIVE_VALUE = Boolean.TRUE; | |
| 42 | // private static final Boolean DEFAULT_RANGE_FIELD_INCLUSIVE_VALUE = Boolean.TRUE; | |
| 43 | // | |
| 44 | // // fields for behind the scenes | |
| 45 | // private String fieldDataType = SearchableAttribute.DEFAULT_SEARCHABLE_ATTRIBUTE_TYPE_NAME; | |
| 46 | // private Boolean hasDatePicker = null; | |
| 47 | // private Boolean allowWildcards; | |
| 48 | // private Boolean autoWildcardBeginning; | |
| 49 | // private Boolean autoWildcardEnding; | |
| 50 | // private Boolean caseSensitive; | |
| 51 | // | |
| 52 | ||
| 53 | // private boolean isIndexedForSearch = true; | |
| 54 | ||
| 55 | // | |
| 56 | // // following values used in ranged searches | |
| 57 | // private String mainFieldLabel; // the fieldLabel holds things like "From" and "Ending" and this field holds things like "Total Amount" | |
| 58 | // private Boolean rangeFieldInclusive; | |
| 59 | // private String savablePropertyName = null; | |
| 60 | // private boolean memberOfRange = false; | |
| 61 | // private String[] propertyValues; | |
| 62 | // | |
| 63 | // public static final Set<String> SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES; | |
| 64 | // public static final Set<String> MULTI_VALUE_FIELD_TYPES = new HashSet<String>(); | |
| 65 | // static { | |
| 66 | // SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES = new HashSet<String>(); | |
| 67 | // SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES.add(HIDDEN); | |
| 68 | // SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES.add(TEXT); | |
| 69 | // SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES.add(DROPDOWN); | |
| 70 | // SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES.add(RADIO); | |
| 71 | // SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES.add(DROPDOWN_REFRESH); | |
| 72 | // SEARCH_RESULT_DISPLAYABLE_FIELD_TYPES.add(MULTIBOX); | |
| 73 | // | |
| 74 | // MULTI_VALUE_FIELD_TYPES.add(MULTIBOX); | |
| 75 | // } | |
| 76 | // | |
| 77 | // | |
| 78 | // private Map<String,String> displayParameters = new HashMap<String,String>(); | |
| 79 | // private List<KeyValuePair> customConversions; //related to fieldConversions?? | |
| 80 | // | |
| 81 | // // below boolean used by criteria processor to hide field without removing classic 'field type' variable | |
| 82 | // private boolean hidden = false; | |
| 83 | // | |
| 84 | // // this field is currently a hack to allow us to indicate whether or not the column of data associated | |
| 85 | // // with a particular field will be visible in the result set of a search or not | |
| 86 | // private boolean isColumnVisible = true; | |
| 87 | // | |
| 88 | // public DocumentSearchField() { | |
| 89 | // super.setFieldLevelHelpEnabled(false); | |
| 90 | // } | |
| 91 | // | |
| 92 | // public DocumentSearchField(String fieldLabel, | |
| 93 | // String fieldHelpUrl, | |
| 94 | // String fieldType, | |
| 95 | // String propertyName, | |
| 96 | // String propertyValue, | |
| 97 | // List fieldValidValues, | |
| 98 | // String quickFinderClassNameImpl) { | |
| 99 | // super(propertyName, fieldLabel); | |
| 100 | // super.setFieldHelpUrl(fieldHelpUrl); | |
| 101 | // super.setFieldType(fieldType); | |
| 102 | // this.savablePropertyName = propertyName; | |
| 103 | // super.setPropertyValue(propertyValue); | |
| 104 | // super.setFieldValidValues(fieldValidValues); | |
| 105 | // super.setQuickFinderClassNameImpl(quickFinderClassNameImpl); | |
| 106 | // } | |
| 107 | // | |
| 108 | // public DocumentSearchField(String fieldLabel, | |
| 109 | // String fieldHelpUrl, | |
| 110 | // String fieldType, | |
| 111 | // String propertyName, | |
| 112 | // String[] propertyValues, | |
| 113 | // List fieldValidValues, | |
| 114 | // String quickFinderClassNameImpl) { | |
| 115 | // super(propertyName, fieldLabel); | |
| 116 | // super.setFieldHelpUrl(fieldHelpUrl); | |
| 117 | // super.setFieldType(fieldType); | |
| 118 | // this.setPropertyValues(propertyValues); | |
| 119 | // this.savablePropertyName = propertyName; | |
| 120 | // super.setFieldValidValues(fieldValidValues); | |
| 121 | // super.setQuickFinderClassNameImpl(quickFinderClassNameImpl); | |
| 122 | // } | |
| 123 | // | |
| 124 | // | |
| 125 | // private boolean getPolicyBooleanValue(Boolean defaultValue,Boolean valueSet) { | |
| 126 | // if (valueSet != null) { | |
| 127 | // return valueSet.booleanValue(); | |
| 128 | // } | |
| 129 | // return defaultValue.booleanValue(); | |
| 130 | // } | |
| 131 | // | |
| 132 | // /** | |
| 133 | // * @return the autoWildcardBeginning | |
| 134 | // */ | |
| 135 | // public Boolean getAutoWildcardBeginning() { | |
| 136 | // return autoWildcardBeginning; | |
| 137 | // } | |
| 138 | // | |
| 139 | // /** | |
| 140 | // * @param autoWildcardBeginning the autoWildcardBeginning to set | |
| 141 | // */ | |
| 142 | // public void setAutoWildcardBeginning(Boolean autoWildcardBeginning) { | |
| 143 | // this.autoWildcardBeginning = autoWildcardBeginning; | |
| 144 | // } | |
| 145 | // | |
| 146 | // /** | |
| 147 | // * @return the autoWildcardEnding | |
| 148 | // */ | |
| 149 | // public Boolean getAutoWildcardEnding() { | |
| 150 | // return autoWildcardEnding; | |
| 151 | // } | |
| 152 | // | |
| 153 | // /** | |
| 154 | // * @param autoWildcardEnding the autoWildcardEnding to set | |
| 155 | // */ | |
| 156 | // public void setAutoWildcardEnding(Boolean autoWildcardEnding) { | |
| 157 | // this.autoWildcardEnding = autoWildcardEnding; | |
| 158 | // } | |
| 159 | // | |
| 160 | // public String getFieldDataType() { | |
| 161 | // return this.fieldDataType; | |
| 162 | // } | |
| 163 | // | |
| 164 | // public Boolean getAllowWildcards() { | |
| 165 | // return this.allowWildcards; | |
| 166 | // } | |
| 167 | // | |
| 168 | // public Boolean getCaseSensitive() { | |
| 169 | // return this.caseSensitive; | |
| 170 | // } | |
| 171 | // | |
| 172 | // public void setFieldDataType(String fieldDataType) { | |
| 173 | // this.fieldDataType = fieldDataType; | |
| 174 | // } | |
| 175 | // | |
| 176 | // public void setAllowWildcards(Boolean allowWildcards) { | |
| 177 | // this.allowWildcards = allowWildcards; | |
| 178 | // } | |
| 179 | // | |
| 180 | // public void setCaseSensitive(Boolean caseSensitive) { | |
| 181 | // this.caseSensitive = caseSensitive; | |
| 182 | // } | |
| 183 | // | |
| 184 | ||
| 185 | // public boolean isIndexedForSearch() { | |
| 186 | // return this.isIndexedForSearch; | |
| 187 | // } | |
| 188 | // | |
| 189 | // public void setIndexedForSearch(boolean indexedForSearch) { | |
| 190 | // this.isIndexedForSearch = indexedForSearch; | |
| 191 | // } | |
| 192 | ||
| 193 | // | |
| 194 | // public String getMainFieldLabel() { | |
| 195 | // return this.mainFieldLabel; | |
| 196 | // } | |
| 197 | // | |
| 198 | // public Boolean getRangeFieldInclusive() { | |
| 199 | // return this.rangeFieldInclusive; | |
| 200 | // } | |
| 201 | // | |
| 202 | // public String getSavablePropertyName() { | |
| 203 | // return this.savablePropertyName; | |
| 204 | // } | |
| 205 | // | |
| 206 | // public boolean isMemberOfRange() { | |
| 207 | // return this.memberOfRange; | |
| 208 | // } | |
| 209 | // | |
| 210 | // public void setMainFieldLabel(String mainFieldLabel) { | |
| 211 | // this.mainFieldLabel = mainFieldLabel; | |
| 212 | // } | |
| 213 | // | |
| 214 | // public void setRangeFieldInclusive(Boolean rangeFieldInclusive) { | |
| 215 | // this.rangeFieldInclusive = rangeFieldInclusive; | |
| 216 | // } | |
| 217 | // | |
| 218 | // public void setSavablePropertyName(String savablePropertyName) { | |
| 219 | // this.savablePropertyName = savablePropertyName; | |
| 220 | // } | |
| 221 | // | |
| 222 | // public void setMemberOfRange(boolean memberOfRange) { | |
| 223 | // this.memberOfRange = memberOfRange; | |
| 224 | // } | |
| 225 | // | |
| 226 | // public String[] getPropertyValues() { | |
| 227 | // return this.propertyValues; | |
| 228 | // } | |
| 229 | // | |
| 230 | // public Map<String, String> getDisplayParameters() { | |
| 231 | // return this.displayParameters; | |
| 232 | // } | |
| 233 | // | |
| 234 | // public void setPropertyValues(String[] propertyValues) { | |
| 235 | // this.propertyValues = propertyValues; | |
| 236 | // } | |
| 237 | // | |
| 238 | // public void setDisplayParameters(Map<String, String> displayParameters) { | |
| 239 | // this.displayParameters = displayParameters; | |
| 240 | // } | |
| 241 | // | |
| 242 | // public List<KeyValuePair> getCustomConversions() { | |
| 243 | // return this.customConversions; | |
| 244 | // } | |
| 245 | // | |
| 246 | // public boolean isHidden() { | |
| 247 | // return this.hidden; | |
| 248 | // } | |
| 249 | // | |
| 250 | // public boolean isColumnVisible() { | |
| 251 | // return this.isColumnVisible; | |
| 252 | // } | |
| 253 | // | |
| 254 | // public void setCustomConversions(List<KeyValuePair> customConversions) { | |
| 255 | // this.customConversions = customConversions; | |
| 256 | // } | |
| 257 | // | |
| 258 | // public void setHidden(boolean hidden) { | |
| 259 | // this.hidden = hidden; | |
| 260 | // } | |
| 261 | // | |
| 262 | // public void setColumnVisible(boolean isColumnVisible) { | |
| 263 | // this.isColumnVisible = isColumnVisible; | |
| 264 | // } | |
| 265 | // | |
| 266 | // public boolean isInclusive() { | |
| 267 | // return getPolicyBooleanValue(DEFAULT_RANGE_FIELD_INCLUSIVE_VALUE, rangeFieldInclusive); | |
| 268 | // } | |
| 269 | // | |
| 270 | // public boolean isAllowingWildcards() { | |
| 271 | // return getPolicyBooleanValue(DEFAULT_ALLOW_WILDCARD_VALUE, allowWildcards); | |
| 272 | // } | |
| 273 | // | |
| 274 | // public boolean isCaseSensitive() { | |
| 275 | // return getPolicyBooleanValue(DEFAULT_CASE_SENSITIVE_VALUE, caseSensitive); | |
| 276 | // } | |
| 277 | // | |
| 278 | // public boolean isAutoWildcardAtBeginning() { | |
| 279 | // return getPolicyBooleanValue(DEFAULT_AUTO_WILDCARD_BEGINNING_VALUE, autoWildcardBeginning); | |
| 280 | // } | |
| 281 | // | |
| 282 | // public boolean isAutoWildcardAtEnding() { | |
| 283 | // return getPolicyBooleanValue(DEFAULT_AUTO_WILDCARD_ENDING_VALUE, autoWildcardEnding); | |
| 284 | // } | |
| 285 | // | |
| 286 | // public boolean isDatePicker() { | |
| 287 | // return getPolicyBooleanValue(Boolean.valueOf(SearchableAttribute.DATA_TYPE_DATE.equalsIgnoreCase(this.fieldDataType)), hasDatePicker); | |
| 288 | // } | |
| 289 | // | |
| 290 | // public void setDatePicker(Boolean hasDatePicker) { | |
| 291 | // this.hasDatePicker = hasDatePicker; | |
| 292 | // } | |
| 293 | // | |
| 294 | // public boolean isUsingCustomConversions() { | |
| 295 | // return (this.customConversions != null) && (!this.customConversions.isEmpty()); | |
| 296 | // } | |
| 297 | // | |
| 298 | // | |
| 299 | // public String getDisplayParameterValue(String key) { | |
| 300 | // return displayParameters.get(key); | |
| 301 | // } | |
| 302 | // | |
| 303 | // public void addDisplayParameter(String key, String value) { | |
| 304 | // displayParameters.put(key, value); | |
| 305 | // } | |
| 306 | ||
| 307 | ||
| 308 | } |