001 /*
002 * Copyright 2005-2008 The Kuali Foundation
003 *
004 *
005 * Licensed under the Educational Community License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.opensource.org/licenses/ecl2.php
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.kuali.rice.kew.docsearch.web;
018
019 import java.io.Serializable;
020
021 /**
022 *
023 * @author Kuali Rice Team (rice.collab@kuali.org)
024 */
025 public class SearchAttributeFormContainer implements Serializable {
026 private static final long serialVersionUID = 8034659910798901330L;
027
028 private String key;
029 private String value;
030 private String[] values;
031 private String alternateValue;
032 private boolean valueSet = false;
033
034 public SearchAttributeFormContainer() {
035 }
036
037 public SearchAttributeFormContainer(String key, String value) {
038 this.key = key;
039 this.value = value;
040 valueSet = true;
041 }
042
043 public SearchAttributeFormContainer(String key, String[] values) {
044 this.key = key;
045 this.values = values;
046 }
047
048 public SearchAttributeFormContainer(String key, String value, String alternateValue) {
049 this.key = key;
050 this.value = value;
051 valueSet = true;
052 this.alternateValue = alternateValue;
053 }
054
055
056 public String getAlternateValue() {
057 return alternateValue;
058 }
059
060 public void setAlternateValue(String alternateValue) {
061 this.alternateValue = alternateValue;
062 }
063
064 public String getKey() {
065 return key;
066 }
067
068 public void setKey(String key) {
069 this.key = key;
070 }
071
072 public String getValue() {
073 return value;
074 }
075
076 public void setValue(String value) {
077 valueSet = true;
078 this.value = value;
079 }
080
081 /**
082 * This should only be called for UI editable implementations
083 * @deprecated
084 */
085 public String getValueForUserInterface() {
086 valueSet = false;
087 return value;
088 }
089
090 /**
091 * This should only be called for UI editable implementations
092 * @deprecated
093 */
094 public void setValueForUserInterface(String value) {
095 valueSet = true;
096 this.value = value;
097 }
098
099 public String[] getValues() {
100 return values;
101 }
102
103 public void setValues(String[] values) {
104 this.values = values;
105 }
106
107 public boolean isValueSet() {
108 return valueSet;
109 }
110
111 }