Class AbstractSolrObserver
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.indexing.observation.AbstractSolrObserver
-
- All Implemented Interfaces:
Observer
,LogEnabled
,Serviceable
- Direct Known Subclasses:
AbstractSolrOnSiteConfModifiedObserver
,AbstractSolrOrgUnitObserver
,SolrContentValidatedObserver
,SolrPageChangePart1Observer
,SolrPageChangePart2Observer
,SolrPageContentModifiedObserver
,SolrPageDataUpdateObserver
,SolrPageDeletionObserver
,SolrSiteAddedObserver
,SolrSiteDeletionObserver
,SolrSitemapDeletionObserver
public abstract class AbstractSolrObserver extends AbstractLogEnabled implements Observer, Serviceable
AbstractObserver
for synchronizing the Solr index for Web components
-
-
Field Summary
Fields Modifier and Type Field Description protected AmetysObjectResolver
_resolver
The Ametys object resolverprotected SiteIndexer
_siteIndexer
The site indexer helperprotected SolrIndexer
_solrIndexer
The Solr indexerprotected SolrPageIndexer
_solrPageIndexer
The Solr page indexer.-
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractSolrObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_updateIndexReferencingPages(String contentId, boolean recursively)
Update index of all pages referencing the content for all workspaces if existsprotected void
_updateIndexReferencingPages(Content content, boolean recursively)
Update index of all pages referencing the content for all workspaces if existsint
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_siteIndexer
protected SiteIndexer _siteIndexer
The site indexer helper
-
_solrIndexer
protected SolrIndexer _solrIndexer
The Solr indexer
-
_solrPageIndexer
protected SolrPageIndexer _solrPageIndexer
The Solr page indexer.
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver
-
-
Constructor Detail
-
AbstractSolrObserver
public AbstractSolrObserver()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getPriority
public int getPriority(Event event)
Description copied from interface:Observer
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers.- Specified by:
getPriority
in interfaceObserver
- Parameters:
event
- the event.- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
_updateIndexReferencingPages
protected void _updateIndexReferencingPages(String contentId, boolean recursively) throws Exception
Update index of all pages referencing the content for all workspaces if exists- Parameters:
contentId
- The id of contentrecursively
- true to index recursively the subpages- Throws:
AmetysRepositoryException
- If an error occurredException
- if an error occurred during indexing
-
_updateIndexReferencingPages
protected void _updateIndexReferencingPages(Content content, boolean recursively) throws Exception
Update index of all pages referencing the content for all workspaces if exists- Parameters:
content
- The contentrecursively
- true to index recursively the subpages- Throws:
AmetysRepositoryException
- If an error occurredException
- if an error occurred during indexing
-
-