001 /**
002 * Copyright 2005-2012 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.framework.document.search;
017
018 import org.kuali.rice.kew.api.document.search.DocumentSearchCriteria;
019 import org.kuali.rice.kew.api.document.search.DocumentSearchResult;
020
021 import java.util.List;
022
023 /**
024 * An abstract implementation of a {@link DocumentSearchCustomizer} which classes can extend from and override the
025 * individual methods that they require in order to perform desired customization. All of the base method
026 * implementations in this class perform the default operation of doing no customization.
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030 public abstract class DocumentSearchCustomizerBase implements DocumentSearchCustomizer {
031
032 /**
033 * Always returns a null reference which instructs the document search framework that the criteria was not
034 * customized.
035 *
036 * @param documentSearchCriteria the criteria on which to perform customization
037 * @return a null reference indicating that no customization was performed
038 */
039 @Override
040 public DocumentSearchCriteria customizeCriteria(DocumentSearchCriteria documentSearchCriteria) {
041 return null;
042 }
043
044 /**
045 * Always returns a null reference which instructs the document search framework that custom criteria clearing was not
046 * performed.
047 *
048 * @param documentSearchCriteria the criteria on which to perform a customized clear
049 * @return a null reference indicating that no customization was performed
050 */
051 @Override
052 public DocumentSearchCriteria customizeClearCriteria(DocumentSearchCriteria documentSearchCriteria) {
053 return null;
054 }
055
056 /**
057 * Always returns a null reference which instructs the document search framework that the customization of results
058 * was not performed.
059 *
060 * @param documentSearchCriteria the search criteria
061 * @param defaultResults the results obtained when executing the search
062 * @return a null reference indicating that no customization was performed
063 */
064 @Override
065 public DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria,
066 List<DocumentSearchResult> defaultResults) {
067 return null;
068 }
069
070 /**
071 * Always returns a null reference which instructs the document search framework that the customization of result
072 * set fields was not performed.
073 *
074 * @param documentSearchCriteria the search criteria
075 * @return a null reference indicating that no customization was performed
076 */
077 @Override
078 public DocumentSearchResultSetConfiguration customizeResultSetConfiguration(
079 DocumentSearchCriteria documentSearchCriteria) {
080 return null;
081 }
082
083 /**
084 * Always returns false indicating that criteria customization is disabled and should not be performed.
085 *
086 * @param documentTypeName the name of the document type under consideration
087 * @return false to indicate that no customization should be performed
088 */
089 @Override
090 public boolean isCustomizeCriteriaEnabled(String documentTypeName) {
091 return false;
092 }
093
094 /**
095 * Always returns false indicating that criteria clearing customization is disabled and should not be performed.
096 *
097 * @param documentTypeName the name of the document type under consideration
098 * @return false to indicate that no customization should be performed
099 */
100 @Override
101 public boolean isCustomizeClearCriteriaEnabled(String documentTypeName) {
102 return false;
103 }
104
105 /**
106 * Always returns false indicating that results customization is disabled and should not be performed.
107 *
108 * @param documentTypeName the name of the document type under consideration
109 * @return false to indicate that no customization should be performed
110 */
111 @Override
112 public boolean isCustomizeResultsEnabled(String documentTypeName) {
113 return false;
114 }
115
116 /**
117 * Always returns false indicating that result set field customization is disabled and should not be performed.
118 *
119 * @param documentTypeName the name of the document type under consideration
120 * @return false to indicate that no customization should be performed
121 */
122 @Override
123 public boolean isCustomizeResultSetFieldsEnabled(String documentTypeName) {
124 return false;
125 }
126
127 }