public class IndexContentObserver extends AbstractLogEnabled implements AsyncObserver, Contextualizable, Serviceable
| Modifier and Type | Field and Description |
|---|---|
protected Context |
_context
The component context.
|
private AmetysObjectResolver |
_resolver |
protected SolrIndexer |
_solrIndexer
The Solr indexer.
|
protected SolrWorkflowIndexer |
_solrWfIndexer
The solr workflow indexer.
|
MAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
IndexContentObserver() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextualize(Context context) |
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
protected boolean |
index(Content content)
Test whether to index the given content or not.
|
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager serviceManager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparallelizableprotected SolrIndexer _solrIndexer
protected SolrWorkflowIndexer _solrWfIndexer
private AmetysObjectResolver _resolver
public IndexContentObserver()
public void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic boolean supports(Event event)
Observerpublic int getPriority(Event event)
ObservergetPriority in interface Observerevent - the event.public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observerobserve in interface Observerevent - the event.transientVars - transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception - if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.