Class AbstractSolrObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.indexing.observation.AbstractSolrObserver
- All Implemented Interfaces:
IndexingObserver
,Observer
,LogEnabled
,Prioritizable
,Supporter<Event>
,Serviceable
- Direct Known Subclasses:
AbstractSolrOnSiteConfModifiedObserver
,AbstractSolrOrgUnitObserver
,SolrContentValidatedObserver
,SolrPageChangePart1Observer
,SolrPageChangePart2Observer
,SolrPageContentModifiedObserver
,SolrPageDataUpdateObserver
,SolrPageDeletionObserver
,SolrSiteAddedObserver
,SolrSiteDeletionObserver
,SolrSitemapDeletionObserver
public abstract class AbstractSolrObserver
extends AbstractLogEnabled
implements IndexingObserver, Serviceable
Abstract
Observer
for synchronizing the Solr index for Web components-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AmetysObjectResolver
The Ametys object resolverprotected SiteIndexer
The site indexer helperprotected SolrIndexer
The Solr indexerprotected SolrPageIndexer
The Solr page indexer.Fields inherited from interface org.ametys.cms.indexing.IndexingObserver
INDEXING_OBSERVER
Fields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
Get the priority for the component.void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.cms.indexing.IndexingObserver
getTraits
-
Field Details
-
_siteIndexer
The site indexer helper -
_solrIndexer
The Solr indexer -
_solrPageIndexer
The Solr page indexer. -
_resolver
The Ametys object resolver
-
-
Constructor Details
-
AbstractSolrObserver
public AbstractSolrObserver()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getPriority
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriority
in interfacePrioritizable
- Returns:
- the priority
-
_updateIndexReferencingPages
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
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
-