Package org.ametys.cms.indexing.solr
Class AbstractIndexerCallable<T extends AmetysObject>
java.lang.Object
org.ametys.cms.indexing.solr.AbstractIndexerCallable<T>
- Type Parameters:
T-AmetysObjecttype indexing by the callable
public abstract class AbstractIndexerCallable<T extends AmetysObject>
extends Object
implements Callable<Void>
Abstract implementation of
Callable for AmetysObject-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractIndexerCallable(T ametysObject, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, ServiceManager manager, Context cocoonContext, AmetysObjectResolver resolver, org.slf4j.Logger logger) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncall()protected abstract StringGet the object label for logs.protected abstract voidProcess theAmetysObjectin the callable.
-
Field Details
-
_ametysObjectId
The ametys object identifier -
_workspaceName
The workspace name -
_solrClient
The Solr client -
_logger
The logger
-
-
Constructor Details
-
AbstractIndexerCallable
public AbstractIndexerCallable(T ametysObject, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, ServiceManager manager, Context cocoonContext, AmetysObjectResolver resolver, org.slf4j.Logger logger) Constructor.- Parameters:
ametysObject- The Ametys object, we only keep the identifierworkspaceName- The workspace namesolrClient- The Solr clientmanager- The service managercocoonContext- The Cocoon contextresolver- The Ametys object resolverlogger- The logger
-
-
Method Details
-
call
- Specified by:
callin interfaceCallable<T extends AmetysObject>- Throws:
Exception
-
process
Process theAmetysObjectin the callable.- Parameters:
ametysObject- The Ametys object- Throws:
Exception- if an error occurs
-
getObjectLabel
Get the object label for logs.- Returns:
- the object label
-