001 /**
002 * Copyright 2005-2013 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 */
016 package org.kuali.rice.kew.docsearch;
017
018 import java.sql.ResultSet;
019 import java.sql.SQLException;
020 import java.util.Map;
021
022 import org.kuali.rice.kew.api.document.attribute.DocumentAttribute;
023 import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue;
024
025
026 /**
027 * Model bean mapped to ojb that holds a single piece of searchable data for a document.
028 *
029 * @author Kuali Rice Team (rice.collab@kuali.org)
030 *
031 */
032 public interface SearchableAttributeValue {
033
034 public String getAttributeDataType();
035
036 public String getAttributeTableName();
037
038 public boolean allowsWildcards();
039
040 public boolean allowsCaseInsensitivity();
041
042 public boolean allowsRangeSearches();
043
044 public boolean isPassesDefaultValidation(String valueEntered);
045
046 public Boolean isRangeValid(String lowerValue, String upperValue);
047
048 public void setupAttributeValue(String value);
049
050 public void setupAttributeValue(ResultSet resultSet, String columnName) throws SQLException;
051
052 public String getSearchableAttributeDisplayValue();
053
054 public String getOjbConcreteClass();
055
056 public void setOjbConcreteClass(String ojbConcreteClass);
057
058 public DocumentRouteHeaderValue getRouteHeader();
059
060 public void setRouteHeader(DocumentRouteHeaderValue routeHeader);
061
062 public String getDocumentId();
063
064 public void setDocumentId(String documentId);
065
066 public String getSearchableAttributeKey();
067
068 public void setSearchableAttributeKey(String searchableAttributeKey);
069
070 public String getSearchableAttributeValueId();
071
072 public void setSearchableAttributeValueId(String searchableAttributeValueId);
073
074 public Object getSearchableAttributeValue();
075
076 public DocumentAttribute toDocumentAttribute();
077 }