public class DefaultIndexerQueryContextFactory extends java.lang.Object implements IndexerQueryContextFactory<DefaultIndexerQueryContext>
IndexerQueryContextFactory. It uses a thread local variable for storing the
context.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INDEXER_QUERY_LISTENERS_KEY |
| Constructor and Description |
|---|
DefaultIndexerQueryContextFactory() |
| Modifier and Type | Method and Description |
|---|---|
DefaultIndexerQueryContext |
createContext(FacetSearchConfig facetSearchConfig,
IndexedType indexedType,
java.lang.String query,
java.util.Map<java.lang.String,java.lang.Object> queryParameters)
Creates a new indexer context and sets it as current.
|
protected void |
createLocalSessionContext() |
void |
destroyContext()
Destroys the current context.
|
void |
destroyContext(java.lang.Exception failureException)
Destroys the current context because an exception occurred.
|
protected void |
executeAfterQueryErrorListeners(DefaultIndexerQueryContext context) |
protected void |
executeAfterQueryListeners(DefaultIndexerQueryContext context) |
protected void |
executeBeforeQueryListeners(DefaultIndexerQueryContext context) |
DefaultIndexerQueryContext |
getContext()
Returns the current context.
|
protected java.util.List<IndexerQueryListener> |
getListeners(DefaultIndexerQueryContext context) |
ListenersFactory |
getListenersFactory() |
SessionService |
getSessionService() |
void |
initializeContext()
Initializes the current context and executes the before index listeners (see
IndexerListener.beforeIndex(IndexerContext)). |
protected void |
removeLocalSessionContext() |
void |
setListenersFactory(ListenersFactory listenersFactory) |
void |
setSessionService(SessionService sessionService) |
public static final java.lang.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, java.lang.String query, java.util.Map<java.lang.String,java.lang.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(java.lang.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 java.util.List<IndexerQueryListener> getListeners(DefaultIndexerQueryContext context)
protected void createLocalSessionContext()
protected void removeLocalSessionContext()
Copyright © 2018 SAP SE. All Rights Reserved.