public class TagDeletedObserver extends AbstractTagObserver
Observer
:
- Clear the cache.
- Update contents tagged with this tag or a descendant tag and send the CONTENT_TAGGED event.Modifier and Type | Field and Description |
---|---|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
protected ObservationManager |
_observationManager
Observer manager.
|
_tagProviderEP
_context, _resolver, _solrIndexer, _solrPageIndexer
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
TagDeletedObserver() |
Modifier and Type | Method and Description |
---|---|
protected void |
_updateTaggedContent(Content content,
Collection<String> tagNames)
Update the tagged content.
|
protected void |
_updateTaggedContents(Collection<String> tagNames)
Update content tagged with at least one of the tag names.
|
protected void |
observe(Site site,
AmetysObject parent,
String tagName,
Event rawEvent)
Typed observe method
|
void |
service(ServiceManager manager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
_clearCache, _getSite, _getSitemap, _getTaggedContents, _updateIndex
_deletePageDocumentsForContent, _getPageInLive, _updatePageDocument, _updatePageDocument, _updatePageDocumentsForContent, contextualize, getPriority, observe
getLogger, setLogger
protected ObservationManager _observationManager
protected CurrentUserProvider _currentUserProvider
public TagDeletedObserver()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractTagObserver
ServiceException
public boolean supports(Event event)
Observer
event
- the event.true
for observing this event, false
otherwise.protected void observe(Site site, AmetysObject parent, String tagName, Event rawEvent)
AbstractTagObserver
observe
in class AbstractTagObserver
site
- the siteparent
- 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 _updateTaggedContents(Collection<String> tagNames) throws Exception
tagNames
- the tags' nameException
- if an error occursprotected void _updateTaggedContent(Content content, Collection<String> tagNames)
content
- the tagged contenttagNames
- the tags' name