public abstract class AbstractResourceSearchIndexer extends AbstractLoggableComponent implements ResourceSearchIndexer
ResourceSearchIndexer
interface.| Modifier and Type | Field and Description |
|---|---|
private DataResourceFactory |
resourceFactory |
| Constructor and Description |
|---|
AbstractResourceSearchIndexer()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize()
This method performs the actual
initialization. |
protected String |
getEntryUri(DataResource resource,
SearchIndexerDataLocation location,
DataResource locationResource)
This method determines the
entry URI for the given
resourceUri. |
protected String |
getStringProperty(GenericContext context,
String key)
This method gets the property
key from the given
properties. |
void |
index(SearchIndexer indexer,
DataResource resource,
ChangeType changeType,
SearchIndexerDataLocation location)
This method indexes a single
DataResource. |
void |
index(SearchIndexer indexer,
DataResource resource,
ChangeType changeType,
SearchIndexerDataLocation location,
EntryUpdateVisitor uriVisitor)
This method indexes a single
DataResource. |
void |
index(SearchIndexer indexer,
DataResource resource,
ChangeType changeType,
SearchIndexerDataLocation location,
EntryUpdateVisitor uriVisitor,
DataResource locationFolder)
This method indexes a single
DataResource. |
void |
setResourceFactory(DataResourceFactory resourceFactory) |
createLogger, getLoggerdoInitialized, getInitializationState, initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateEntry, indexprivate DataResourceFactory resourceFactory
setResourceFactory(DataResourceFactory)public AbstractResourceSearchIndexer()
@Inject public void setResourceFactory(DataResourceFactory resourceFactory)
resourceFactory - is the resourceFactory to setprotected void doInitialize()
initialization. It is called when AbstractComponent.initialize() is
invoked for the first time. super.AbstractComponent.doInitialize().doInitialize in class AbstractLoggableComponentprotected String getEntryUri(DataResource resource, SearchIndexerDataLocation location, DataResource locationResource)
entry URI for the given
resourceUri.resource - is the DataResource for which the
URI is requested.location - is the SearchIndexerDataLocation used to check
SearchIndexerDataLocation.isAbsoluteUris().locationResource - is the DataResource for
SearchIndexerDataLocation.getLocationUri().URI for the
resource to index.protected String getStringProperty(GenericContext context, String key)
key from the given
properties. It will also trim the
properties value.context - is where to get the property from.key - is the name of the requested property.null if the property is NOT
set or its trimmed value is the empty string.public void index(SearchIndexer indexer, DataResource resource, ChangeType changeType, SearchIndexerDataLocation location)
DataResource. resources, you should use
ResourceSearchIndexer.index(SearchIndexer, DataResource, ChangeType, SearchIndexerDataLocation, EntryUpdateVisitor, DataResource)
to avoid performance-overhead.index in interface ResourceSearchIndexerindexer - is the SearchIndexer used for indexing.resource - is the DataResource to index.changeType - indicates the change for resource. In case of add
it should be added, in case of
update it should be updated and in case of remove it should be
removed. The changeType can also be
null to indicate that the resource was already indexed and remains
untouched as it is not modified.location - is the SearchIndexerDataLocation where the resource comes from.public void index(SearchIndexer indexer, DataResource resource, ChangeType changeType, SearchIndexerDataLocation location, EntryUpdateVisitor uriVisitor)
DataResource. resources, you should use
ResourceSearchIndexer.index(SearchIndexer, DataResource, ChangeType, SearchIndexerDataLocation, EntryUpdateVisitor, DataResource)
to avoid performance-overhead.index in interface ResourceSearchIndexerindexer - is the SearchIndexer used for indexing.resource - is the DataResource to index.changeType - indicates the change for resource. In case of add
it should be added, in case of
update it should be updated and in case of remove it should be
removed. The changeType can also be
null to indicate that the resource was already indexed and remains
untouched as it is not modified.location - is the SearchIndexerDataLocation where the resource comes from.uriVisitor - is the EntryUpdateVisitor.public void index(SearchIndexer indexer, DataResource resource, ChangeType changeType, SearchIndexerDataLocation location, EntryUpdateVisitor uriVisitor, DataResource locationFolder)
DataResource.index in interface ResourceSearchIndexerindexer - is the SearchIndexer used for indexing.resource - is the DataResource to index.changeType - indicates the change for resource. In case of add
it should be added, in case of
update it should be updated and in case of remove it should be
removed. The changeType can also be
null to indicate that the resource was already indexed and remains
untouched as it is not modified.location - is the SearchIndexerDataLocation where the resource comes from.uriVisitor - is the EntryUpdateVisitor.locationFolder - is the DataResource for SearchIndexerDataLocation.getLocationUri().Copyright © 2001–2016 mmm-Team. All rights reserved.