Package org.ametys.cms.indexing.explorer
Class SolrIndexResourceObserver
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.indexing.explorer.AbstractSolrIndexResourceObserver
org.ametys.cms.indexing.explorer.SolrIndexResourceObserver
- All Implemented Interfaces:
 AsyncObserver,Observer,LogEnabled,Contextualizable,Serviceable
- Direct Known Subclasses:
 SolrIndexWebResourceObserver
Observer in charge of indexing explorer resources when created, modified, moved...
- 
Field Summary
Fields inherited from class org.ametys.cms.indexing.explorer.AbstractSolrIndexResourceObserver
_context, _resolver, _solrIndexer, DISABLE_INDEXING_KEYFields inherited from interface org.ametys.core.observation.Observer
MAX_PRIORITY, MIN_PRIORITY - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected String[]Get the list of workspace to indexprotected booleanisHandledResource(AmetysObject object) Returns true if it is aResourceorResourceCollectionhandled by this observerprotected voidonCollectionRenamedOrMoved(ResourceCollection resourceCollection, String workspaceName) Method called when a resource collection handled by this observer is renamed or moved.protected voidonResourceCreated(Resource resource, String workspaceName) Method called when a resource handled by this observer is created.protected voidonResourceUpdated(Resource resource, String workspaceName) Method called when a resource handled by this observer is updated, moved or renamed.Methods inherited from class org.ametys.cms.indexing.explorer.AbstractSolrIndexResourceObserver
_index, contextualize, getPriority, observe, service, supportsMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.core.observation.AsyncObserver
parallelizable 
- 
Constructor Details
- 
SolrIndexResourceObserver
public SolrIndexResourceObserver() 
 - 
 - 
Method Details
- 
getWorkspacesToIndex
Description copied from class:AbstractSolrIndexResourceObserverGet the list of workspace to index- Specified by:
 getWorkspacesToIndexin classAbstractSolrIndexResourceObserver- Returns:
 - An array of workspace names
 
 - 
isHandledResource
Description copied from class:AbstractSolrIndexResourceObserverReturns true if it is aResourceorResourceCollectionhandled by this observer- Specified by:
 isHandledResourcein classAbstractSolrIndexResourceObserver- Parameters:
 object- The resource or collection- Returns:
 - true if it is handled by this observer
 
 - 
onResourceCreated
Description copied from class:AbstractSolrIndexResourceObserverMethod called when a resource handled by this observer is created. Typically for indexing the created resource.- Specified by:
 onResourceCreatedin classAbstractSolrIndexResourceObserver- Parameters:
 resource- The created resourceworkspaceName- The workspace name- Throws:
 Exception- if an error occurs
 - 
onResourceUpdated
Description copied from class:AbstractSolrIndexResourceObserverMethod called when a resource handled by this observer is updated, moved or renamed. Typically for indexing the updated resource.- Specified by:
 onResourceUpdatedin classAbstractSolrIndexResourceObserver- Parameters:
 resource- The updated resourceworkspaceName- The workspace name- Throws:
 Exception- if an error occurs
 - 
onCollectionRenamedOrMoved
protected void onCollectionRenamedOrMoved(ResourceCollection resourceCollection, String workspaceName) throws Exception Description copied from class:AbstractSolrIndexResourceObserverMethod called when a resource collection handled by this observer is renamed or moved. Typically for indexing the children of the resource collection.- Specified by:
 onCollectionRenamedOrMovedin classAbstractSolrIndexResourceObserver- Parameters:
 resourceCollection- The resource collectionworkspaceName- The workspace name- Throws:
 Exception- if an error occurs
 
 -