public abstract class AbstractSolrODFObserver extends AbstractODFObserver
Observer for synchronizing the Solr indexes.| Modifier and Type | Field and Description |
|---|---|
protected OdfPageResolver |
_odfPageResolver
ODF page resolver
|
protected SolrIndexer |
_solrIndexer
The Solr indexer
|
protected SolrPageIndexer |
_solrPageIndexer
The page indexer.
|
_cocoonContext, _context, _odfHelper, _resolverMAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
AbstractSolrODFObserver() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_internalObserve(Event event,
Map<String,Object> transientVars,
Page odfRootPage,
Set<Program> programs,
SubProgram subProgram,
Course course)
Do the actual work.
|
protected abstract void |
_updateIndex(Event event,
Map<String,Object> transientVars,
Page odfRootPage,
Program program,
SubProgram subProgram,
Course course)
Update the index from the observed event.
|
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
service(ServiceManager manager) |
_getContentArgument, _getCourse, _getODFRootPages, _getPrograms, _getSubProgram, _workspaceToUse, contextualize, observegetLogger, setLoggerprotected SolrIndexer _solrIndexer
protected SolrPageIndexer _solrPageIndexer
protected OdfPageResolver _odfPageResolver
public AbstractSolrODFObserver()
public void service(ServiceManager manager) throws ServiceException
service in interface Serviceableservice in class AbstractODFObserverServiceExceptionpublic int getPriority(Event event)
Observerevent - the event.protected final void _internalObserve(Event event, Map<String,Object> transientVars, Page odfRootPage, Set<Program> programs, SubProgram subProgram, Course course) throws Exception
AbstractODFObserver_internalObserve in class AbstractODFObserverevent - the event.transientVars - transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.odfRootPage - the Page holding the virtual factory.programs - the root programs.subProgram - The subprogram. Can be nullcourse - The course. Can be null.Exception - if an error occuredprotected abstract void _updateIndex(Event event, Map<String,Object> transientVars, Page odfRootPage, Program program, SubProgram subProgram, Course course) throws Exception
event - the event.transientVars - transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.odfRootPage - the odf root pageprogram - the target programsubProgram - The subprogram. Can be nullcourse - the course. Can be null.Exception - if an error occurs.