/*
* #%L
* BroadleafCommerce Framework
* %%
* Copyright (C) 2009 - 2013 Broadleaf Commerce
* %%
* 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.
* #L%
*/
package org.broadleafcommerce.core.search.service.solr;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.common.SolrInputDocument;
import org.broadleafcommerce.common.extension.AbstractExtensionHandler;
import org.broadleafcommerce.common.extension.ExtensionResultStatusType;
import org.broadleafcommerce.common.locale.domain.Locale;
import org.broadleafcommerce.core.catalog.domain.Category;
import org.broadleafcommerce.core.catalog.domain.Product;
import org.broadleafcommerce.core.catalog.domain.Sku;
import org.broadleafcommerce.core.search.domain.Field;
import org.broadleafcommerce.core.search.domain.SearchCriteria;
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.Collection;
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<String> prefixList) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType buildPrefixListForSearchableField(Field field, FieldType searchableFieldType, List<String> prefixList) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType filterSearchFacetRanges(SearchFacetDTO dto, List<SearchFacetRange> ranges) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType addPropertyValues(Product product, Field field, FieldType fieldType,
Map<String, Object> values, String propertyName, List<Locale> locales) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType addPropertyValues(Sku sku, Field field, FieldType fieldType,
Map<String, Object> values, String propertyName, List<Locale> locales) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType modifySolrQuery(SolrQuery query, String qualifiedSolrQuery, List<SearchFacetDTO> facets, SearchCriteria searchCriteria, String defaultSort) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType attachAdditionalBasicFields(Product product, SolrInputDocument document, SolrHelperService shs) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType attachAdditionalBasicFields(Sku sku, SolrInputDocument document, SolrHelperService shs) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType getSolrDocumentId(SolrInputDocument document, Product product, String[] returnContainer) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType getSolrDocumentId(SolrInputDocument document, Sku product, String[] returnContainer) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType getCategoryId(Category category, Long[] returnContainer) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType getCategoryId(Long category, Long[] returnContainer) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType getProductId(Product product, Long[] returnContainer) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType getSkuId(Sku sku, Long[] returnContainer) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType modifyBuiltDocuments(Collection<SolrInputDocument> documents, List<Product> products, List<Field> fields, List<Locale> locales) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType startBatchEvent(List<Product> products) {
return ExtensionResultStatusType.NOT_HANDLED;
}
@Override
public ExtensionResultStatusType endBatchEvent() {
return ExtensionResultStatusType.NOT_HANDLED;
}
}