public class TagUpdatedObserver extends AbstractTagObserver
Observer
:
- Clear the cache.
- Re-index contents tagged with this tag or a descendant tag._tagProviderEP
_context, _resolver, _solrIndexer, _solrPageIndexer
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
TagUpdatedObserver() |
Modifier and Type | Method and Description |
---|---|
protected void |
_reindexContent(Content content)
Re-index the given content
|
protected void |
_reindexTaggedContents(Collection<String> descendantNames)
Re-index content tagged with at least of this tags
|
protected void |
observe(Site site,
AmetysObject aoTag,
String tagName,
Event rawEvent)
Typed observe method
|
boolean |
supports(Event event)
Checks if the event is supported.
|
_clearCache, _getSite, _getTaggedContents, _updateIndex, service
_deletePageDocumentsForContent, _getPageInLive, _updatePageDocument, _updatePageDocument, _updatePageDocumentsForContent, contextualize, getPriority, observe
getLogger, setLogger
public TagUpdatedObserver()
public boolean supports(Event event)
Observer
event
- the event.true
for observing this event, false
otherwise.protected void observe(Site site, AmetysObject aoTag, String tagName, Event rawEvent)
AbstractTagObserver
observe
in class AbstractTagObserver
site
- the siteaoTag
- 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 void _reindexTaggedContents(Collection<String> descendantNames) throws Exception
descendantNames
- the descendant's nameException
- if an error occursprotected void _reindexContent(Content content) throws Exception
content
- the content to re-indexException
- if unable to create or update the index