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, _resolver
MAX_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, observe
getLogger, setLogger
protected SolrIndexer _solrIndexer
protected SolrPageIndexer _solrPageIndexer
protected OdfPageResolver _odfPageResolver
public AbstractSolrODFObserver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractODFObserver
ServiceException
public int getPriority(Event event)
Observer
event
- 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 AbstractODFObserver
event
- 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.