public class DefaultIndexerQueryContextFactory extends Object implements IndexerQueryContextFactory<DefaultIndexerQueryContext>
IndexerQueryContextFactory. It uses a thread local variable for storing the
context.| Modifier and Type | Field and Description |
|---|---|
static String |
INDEXER_QUERY_LISTENERS_KEY |
| Constructor and Description |
|---|
DefaultIndexerQueryContextFactory() |
public static final String INDEXER_QUERY_LISTENERS_KEY
public SessionService getSessionService()
public void setSessionService(SessionService sessionService)
public ListenersFactory getListenersFactory()
public void setListenersFactory(ListenersFactory listenersFactory)
public DefaultIndexerQueryContext createContext(FacetSearchConfig facetSearchConfig, IndexedType indexedType, String query, Map<String,Object> queryParameters) throws IndexerException
IndexerQueryContextFactorycreateContext in interface IndexerQueryContextFactory<DefaultIndexerQueryContext>facetSearchConfig - - the facet search configurationindexedType - - the indexed typequery - - the queryqueryParameters - - the query parametersIndexerException - if an error occurs during the listeners executionpublic void initializeContext()
throws IndexerException
IndexerQueryContextFactoryIndexerListener.beforeIndex(IndexerContext)).initializeContext in interface IndexerQueryContextFactory<DefaultIndexerQueryContext>IndexerException - if an error occurs during the listeners executionpublic DefaultIndexerQueryContext getContext()
IndexerQueryContextFactorygetContext in interface IndexerQueryContextFactory<DefaultIndexerQueryContext>public void destroyContext()
throws IndexerException
IndexerQueryContextFactoryIndexerQueryListener.afterQuery(IndexerQueryContext)).destroyContext in interface IndexerQueryContextFactory<DefaultIndexerQueryContext>IndexerException - if an error occurs during the listeners executionpublic void destroyContext(Exception failureException)
IndexerQueryContextFactoryIndexerQueryListener.afterQueryError(IndexerQueryContext)).destroyContext in interface IndexerQueryContextFactory<DefaultIndexerQueryContext>protected void executeBeforeQueryListeners(DefaultIndexerQueryContext context) throws IndexerException
IndexerExceptionprotected void executeAfterQueryListeners(DefaultIndexerQueryContext context) throws IndexerException
IndexerExceptionprotected void executeAfterQueryErrorListeners(DefaultIndexerQueryContext context)
protected List<IndexerQueryListener> getListeners(DefaultIndexerQueryContext context)
protected void createLocalSessionContext()
protected void removeLocalSessionContext()
Copyright © 2017 SAP SE. All Rights Reserved.