Class AbstractSolrContentObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.ugc.observation.AbstractContentObserver
-
- org.ametys.plugins.ugc.observation.AbstractSolrContentObserver
-
- All Implemented Interfaces:
Observer,LogEnabled,Contextualizable,Serviceable
- Direct Known Subclasses:
AbstractSolrContentAsyncObserver,SolrContentDeletedObserver,SolrContentUnpublishedObserver,SolrContentValidatedObserver
public abstract class AbstractSolrContentObserver extends AbstractContentObserver
AbstractObserverfor synchronizing the Solr indexes.
-
-
Field Summary
Fields Modifier and Type Field Description protected SolrPageIndexer_solrPageIndexerThe Solr page indexer.protected UGCPageHandler_UGCPageHandlerThe UGC page handler-
Fields inherited from class org.ametys.plugins.ugc.observation.AbstractContentObserver
_cocoonContext, _contentTypeHelper, _context, _resolver, _ugcPageHandler, _zoneItemCache
-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractSolrContentObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<UGCPage>_getContentPage(Page rootContentPage, Content content)Get content pageintgetPriority(Event event)Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.plugins.ugc.observation.AbstractContentObserver
_getTarget, _getUGCRootPages, _internalObserve, _isUGCContent, _removeZoneItemCache, contextualize, observe
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_solrPageIndexer
protected SolrPageIndexer _solrPageIndexer
The Solr page indexer.
-
_UGCPageHandler
protected UGCPageHandler _UGCPageHandler
The UGC page handler
-
-
Constructor Detail
-
AbstractSolrContentObserver
public AbstractSolrContentObserver()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractContentObserver- Throws:
ServiceException
-
getPriority
public int getPriority(Event event)
Description copied from interface:ObserverRetrieves 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.
-
_getContentPage
protected Optional<UGCPage> _getContentPage(Page rootContentPage, Content content)
Get content page- Parameters:
rootContentPage- the root content pagecontent- the content- Returns:
- the content page
-
-