public abstract class AbstractSolrOrgUnitObserver extends AbstractSolrObserver
Observer
for observing orgunit modifications
in order to synchronize Solr index.Modifier and Type | Field and Description |
---|---|
protected OdfPageHandler |
_odfPageHandler
The ODF page handler.
|
protected OdfProgramRestrictionManager |
_odfProgramRestrictionManager
Odf program restriction manager
|
protected SiteConfigurationExtensionPoint |
_siteConf
The site configuration.
|
protected SiteManager |
_siteManager
The site manager.
|
_resolver, _siteIndexer, _solrIndexer, _solrPageIndexer
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
AbstractSolrOrgUnitObserver() |
Modifier and Type | Method and Description |
---|---|
protected abstract String[] |
_supportedEventIds()
Gets the supported event ids for this Observer to look for the
OrgUnit s |
protected abstract void |
_updateIndex(Page odfRootPage)
Update the index from the observed event.
|
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.
|
_updateIndexReferencingPages, getPriority
getLogger, setLogger
protected SiteManager _siteManager
protected SiteConfigurationExtensionPoint _siteConf
protected OdfPageHandler _odfPageHandler
protected OdfProgramRestrictionManager _odfProgramRestrictionManager
public AbstractSolrOrgUnitObserver()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class AbstractSolrObserver
ServiceException
public boolean supports(Event event)
Observer
event
- the event.true
for observing this event, false
otherwise.protected abstract String[] _supportedEventIds()
OrgUnit
spublic void observe(Event event, Map<String,Object> transientVars) throws Exception
Observer
event
- 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.protected abstract void _updateIndex(Page odfRootPage) throws Exception
odfRootPage
- the odf root pageException
- if an error occurs.