Package org.opencms.search
Class CmsSearchIndexUpdateData
- java.lang.Object
-
- org.opencms.search.CmsSearchIndexUpdateData
-
public class CmsSearchIndexUpdateData extends java.lang.Object
A collection of resources for the incremental update of a search index.- Since:
- 6.0.1
-
-
Constructor Summary
Constructors Constructor Description CmsSearchIndexUpdateData(CmsSearchIndexSource source, I_CmsIndexer indexer)
Creates a new instance of an update collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResourceToDelete(CmsPublishedResource resource)
Adds the given resource to the resources that must be deleted from the search index.void
addResourceToUpdate(CmsPublishedResource resource)
Adds the given resource to the resources that must be updated in the search index.I_CmsIndexer
getIndexer()
Returns the indexer of this update collection.java.util.List<CmsPublishedResource>
getResourcesToDelete()
Returns the list of
instances that must be deleted.CmsPublishedResource
java.util.List<CmsPublishedResource>
getResourcesToUpdate()
Returns the list of
instances that must be updated.CmsPublishedResource
CmsSearchIndexSource
getSource()
Returns the search index source of this update collection.boolean
hasResourcesToDelete()
Returnstrue
if this collections contains resources to delete.boolean
hasResourceToUpdate()
Returnstrue
if this collections contains resources to update.boolean
isEmpty()
Returnstrue
if this collections contains no resources to update or delete.
-
-
-
Constructor Detail
-
CmsSearchIndexUpdateData
public CmsSearchIndexUpdateData(CmsSearchIndexSource source, I_CmsIndexer indexer)
Creates a new instance of an update collection.- Parameters:
source
- the search index source of this update collectionindexer
- the indexer of this update collection
-
-
Method Detail
-
addResourceToDelete
public void addResourceToDelete(CmsPublishedResource resource)
Adds the given resource to the resources that must be deleted from the search index.- Parameters:
resource
- the resource to add
-
addResourceToUpdate
public void addResourceToUpdate(CmsPublishedResource resource)
Adds the given resource to the resources that must be updated in the search index.- Parameters:
resource
- the resource to add
-
getIndexer
public I_CmsIndexer getIndexer()
Returns the indexer of this update collection.- Returns:
- the indexer of this update collection
-
getResourcesToDelete
public java.util.List<CmsPublishedResource> getResourcesToDelete()
Returns the list of
instances that must be deleted.CmsPublishedResource
- Returns:
- the list of
instances that must be deletedCmsPublishedResource
-
getResourcesToUpdate
public java.util.List<CmsPublishedResource> getResourcesToUpdate()
Returns the list of
instances that must be updated.CmsPublishedResource
- Returns:
- the list of
instances that must be updatedCmsPublishedResource
-
getSource
public CmsSearchIndexSource getSource()
Returns the search index source of this update collection.- Returns:
- the search index source of this update collection
-
hasResourcesToDelete
public boolean hasResourcesToDelete()
Returnstrue
if this collections contains resources to delete.- Returns:
true
if this collections contains resources to delete
-
hasResourceToUpdate
public boolean hasResourceToUpdate()
Returnstrue
if this collections contains resources to update.- Returns:
true
if this collections contains resources to update
-
isEmpty
public boolean isEmpty()
Returnstrue
if this collections contains no resources to update or delete.- Returns:
true
if this collections contains no resources to update or delete
-
-