| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| DocumentSearchResultSetConfigurationContract |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2005-2011 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.framework.document.search; | |
| 17 | ||
| 18 | import org.kuali.rice.core.api.uif.AttributeField; | |
| 19 | ||
| 20 | import java.util.List; | |
| 21 | ||
| 22 | /** | |
| 23 | * Defines how the display of results on the document search should be customized and configured. This class can be | |
| 24 | * used to remove standard fields from the result set that are typically show on document search results. This class | |
| 25 | * is also used to add additional fields | |
| 26 | * | |
| 27 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 28 | */ | |
| 29 | public interface DocumentSearchResultSetConfigurationContract { | |
| 30 | ||
| 31 | /** | |
| 32 | * Returns true if the custom field names returned by {@link #getCustomFieldNamesToAdd()} should be used to define | |
| 33 | * the order of searchable attributes as well as additional custom additional fields. Returns false if any | |
| 34 | * searchable attribute values should be included in the result set according to their existing configuration. | |
| 35 | * | |
| 36 | * @return true if custom field names defined by this object should override any default searchable attribute result | |
| 37 | * field display behavior, flase if searchable attribute fields should still be displayed in the result set | |
| 38 | * according to their own configuration | |
| 39 | */ | |
| 40 | boolean isOverrideSearchableAttributes(); | |
| 41 | ||
| 42 | /** | |
| 43 | * Returns a list of field names of custom fields representing document attributes which should be added to the | |
| 44 | * result set. This may contains fields that are defined in {@link #getAdditionalAttributeFields()} or also fields | |
| 45 | * defined as part of a {@link org.kuali.rice.kew.framework.document.attribute.SearchableAttribute} (see {@code isOverrideSearchableAttributes()}). | |
| 46 | * | |
| 47 | * @return a list of field names of custom document attributes which should be added to the result set, can be an | |
| 48 | * empty or null list in which case no fields will be added | |
| 49 | */ | |
| 50 | List<String> getCustomFieldNamesToAdd(); | |
| 51 | ||
| 52 | /** | |
| 53 | * Returns a list of the standard (built-in) document search result fields which should not be displayed in the | |
| 54 | * result set. The document search implementation should do it's best to honor the request to remove standard | |
| 55 | * fields from the result set, but it is free to ignore such requests if needed. An example of this would be a | |
| 56 | * preference for the implementation of document search that requires certain result set fields to remain (such as | |
| 57 | * the document id and route log which is usually recommended to display). | |
| 58 | * | |
| 59 | * @return a list of standard result fields to remove from inclusion in the result set, may be an empty or null | |
| 60 | * list if no standard result fields should be removed | |
| 61 | */ | |
| 62 | List<StandardResultField> getStandardResultFieldsToRemove(); | |
| 63 | ||
| 64 | /** | |
| 65 | * Gets attribute field definitions for additional attributes that may be displayed in the result set. This simply | |
| 66 | * defines the attribute field definition for each of these fields, their inclusion here does not necessarily mean | |
| 67 | * they will be visible in the result set. This is controlled primarily by {@link #getCustomFieldNamesToAdd()}. | |
| 68 | * | |
| 69 | * @return a list containing additional attribute fields to define for use when constructing the result set, this | |
| 70 | * method can return a null or empty list if there are no additional attribute fields to define | |
| 71 | */ | |
| 72 | List<? extends AttributeField> getAdditionalAttributeFields(); | |
| 73 | ||
| 74 | } |