org.broadleafcommerce.core.search.service.solr.AbstractSolrSearchServiceExtensionHandler Maven / Gradle / Ivy
/*
* Copyright 2008-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.broadleafcommerce.core.search.service.solr;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.common.SolrInputDocument;
import org.broadleafcommerce.common.locale.domain.Locale;
import org.broadleafcommerce.core.catalog.domain.Product;
import org.broadleafcommerce.core.extension.AbstractExtensionHandler;
import org.broadleafcommerce.core.extension.ExtensionResultStatusType;
import org.broadleafcommerce.core.search.domain.Field;
import org.broadleafcommerce.core.search.domain.ProductSearchCriteria;
import org.broadleafcommerce.core.search.domain.SearchFacetDTO;
import org.broadleafcommerce.core.search.domain.SearchFacetRange;
import org.broadleafcommerce.core.search.domain.solr.FieldType;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;
/**
* Implementors of the SolrSearchServiceExtensionHandler interface should extend this class so that if
* additional extension points are added which they don't care about, their code will not need to be
* modified.
*
* @author bpolster
*/
public abstract class AbstractSolrSearchServiceExtensionHandler extends AbstractExtensionHandler
implements SolrSearchServiceExtensionHandler {
@Override
public ExtensionResultStatusType buildPrefixListForSearchableFacet(Field field, List prefixList) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType buildPrefixListForSearchableField(Field field, FieldType searchableFieldType, List prefixList) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType filterSearchFacetRanges(SearchFacetDTO dto, List ranges) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType addPropertyValues(Product product, Field field, FieldType fieldType,
Map values, String propertyName, List locales) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType modifySolrQuery(SolrQuery query, String qualifiedSolrQuery, List facets, ProductSearchCriteria searchCriteria, String defaultSort) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType attachAdditionalBasicFields(Product product, SolrInputDocument document,
SolrHelperService shs) {
return ExtensionResultStatusType.NOT_HANDLED;
}
}