Class AbstractSolrODFObserver

All Implemented Interfaces:
Observer, LogEnabled, Contextualizable, Serviceable
Direct Known Subclasses:
SolrContentValidatedPart1Observer, SolrContentValidatedPart2Observer, UnindexProgramObserver

public abstract class AbstractSolrODFObserver extends AbstractODFObserver
Abstract Observer for synchronizing the Solr indexes.
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Overrides:
      service in class AbstractODFObserver
      Throws:
      ServiceException
    • getPriority

      public int getPriority(Event event)
      Description copied from interface: Observer
      Retrieves the priority to observe this event.
      This can be used to process a supported event before others observers.
      Parameters:
      event - the event.
      Returns:
      the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
    • _internalObserve

      protected final void _internalObserve(Event event, Map<String,Object> transientVars, Page odfRootPage, Set<Program> programs, SubProgram subProgram, Course course) throws Exception
      Description copied from class: AbstractODFObserver
      Do the actual work.
      Specified by:
      _internalObserve in class AbstractODFObserver
      Parameters:
      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 null
      course - The course. Can be null.
      Throws:
      Exception - if an error occured
    • _updateIndex

      protected abstract void _updateIndex(Event event, Map<String,Object> transientVars, Page odfRootPage, Program program, SubProgram subProgram, Course course) throws Exception
      Update the index from the observed event.
      Parameters:
      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 page
      program - the target program
      subProgram - The subprogram. Can be null
      course - the course. Can be null.
      Throws:
      Exception - if an error occurs.