public class ContentAttachmentsSolrObserver extends AbstractSolrIndexResourceObserver
Modifier and Type | Field and Description |
---|---|
private Content |
_content |
_context, _resolver, _solrIndexer, DISABLE_INDEXING_KEY
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
ContentAttachmentsSolrObserver() |
Modifier and Type | Method and Description |
---|---|
protected String[] |
getWorkspacesToIndex()
Get the list of workspace to index
|
protected boolean |
isHandledResource(AmetysObject object)
Returns true if it is a
Resource or ResourceCollection handled by this observer |
protected void |
onCollectionRenamedOrMoved(ResourceCollection resourceCollection,
String workspaceName)
Method called when a resource collection handled by this observer is renamed or moved.
|
protected void |
onResourceCreated(Resource resource,
String workspaceName)
Method called when a resource handled by this observer is created.
|
protected void |
onResourceUpdated(Resource resource,
String workspaceName)
Method called when a resource handled by this observer is updated, moved or renamed.
|
void |
service(ServiceManager serviceManager) |
_index, contextualize, getPriority, observe, supports
getLogger, setLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parallelizable
public ContentAttachmentsSolrObserver()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class AbstractSolrIndexResourceObserver
ServiceException
protected String[] getWorkspacesToIndex()
AbstractSolrIndexResourceObserver
getWorkspacesToIndex
in class AbstractSolrIndexResourceObserver
protected boolean isHandledResource(AmetysObject object)
AbstractSolrIndexResourceObserver
Resource
or ResourceCollection
handled by this observerisHandledResource
in class AbstractSolrIndexResourceObserver
object
- The resource or collectionprotected void onResourceCreated(Resource resource, String workspaceName) throws Exception
AbstractSolrIndexResourceObserver
onResourceCreated
in class AbstractSolrIndexResourceObserver
resource
- The created resourceworkspaceName
- The workspace nameException
- if an error occursprotected void onResourceUpdated(Resource resource, String workspaceName) throws Exception
AbstractSolrIndexResourceObserver
onResourceUpdated
in class AbstractSolrIndexResourceObserver
resource
- The updated resourceworkspaceName
- The workspace nameException
- if an error occursprotected void onCollectionRenamedOrMoved(ResourceCollection resourceCollection, String workspaceName) throws Exception
AbstractSolrIndexResourceObserver
onCollectionRenamedOrMoved
in class AbstractSolrIndexResourceObserver
resourceCollection
- The resource collectionworkspaceName
- The workspace nameException
- if an error occurs