public abstract class AbstractTagObserver extends AbstractLiveSolrObserver
Observer
Modifier and Type | Field and Description |
---|---|
protected TagProviderExtensionPoint |
_tagProviderEP
The tag provider EP
|
_context, _resolver, _solrIndexer, _solrPageIndexer
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
AbstractTagObserver() |
Modifier and Type | Method and Description |
---|---|
protected void |
_clearCache(Site site)
Clear site cache
|
protected Site |
_getSite(AmetysObject tagOrParent)
Get the site of a jcr tag.
|
protected AmetysObjectIterable<Content> |
_getTaggedContents(Collection<String> descendantNames)
Re-index content tagged with at least of this tags
|
protected void |
_updateIndex(Event event,
Map<String,Object> transientVars)
Update the index from the event observed.
|
protected abstract void |
observe(Site site,
AmetysObject tagOrParent,
String tagName,
Event rawEvent)
Typed observe method
|
void |
service(ServiceManager manager) |
_deletePageDocumentsForContent, _getPageInLive, _updatePageDocument, _updatePageDocument, _updatePageDocumentsForContent, contextualize, getPriority, observe
getLogger, setLogger
protected TagProviderExtensionPoint _tagProviderEP
public AbstractTagObserver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractLiveSolrObserver
ServiceException
protected void _updateIndex(Event event, Map<String,Object> transientVars) throws Exception
AbstractLiveSolrObserver
_updateIndex
in class AbstractLiveSolrObserver
event
- the event.transientVars
- the transient vars passed from one Observer to another when processing a single Event.Exception
- if an error occurs.protected abstract void observe(Site site, AmetysObject tagOrParent, String tagName, Event rawEvent)
site
- the sitetagOrParent
- the tag or its parenttagName
- the tag name corresponding the the object tagOrParent when applicable.rawEvent
- The raw event from which the previous arguments have been extracted.protected Site _getSite(AmetysObject tagOrParent)
tagOrParent
- Ametys object which can be a tag or its parent depending on the event type.protected void _clearCache(Site site)
site
- the siteprotected AmetysObjectIterable<Content> _getTaggedContents(Collection<String> descendantNames) throws Exception
descendantNames
- the descendant tags' nameException
- if an error occurs