Class ProjectDocumentProvider
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.workspaces.indexing.solr.ProjectDocumentProvider
-
- All Implemented Interfaces:
DocumentProvider
,LogEnabled
,Contextualizable
,Serviceable
public class ProjectDocumentProvider extends AbstractLogEnabled implements DocumentProvider, Serviceable, Contextualizable
DocumentProvider
for indexing documents (project resources...) during workspace indexation
-
-
Field Summary
Fields Modifier and Type Field Description protected Context
_context
The component context.protected DocumentWorkspaceModule
_documentModule
The manager for documentsprotected ProjectManager
_projectManager
The manager forProject
sprotected SolrProjectResourceIndexer
_solrProjectResourceIndexer
The Solr indexer for project resources
-
Constructor Summary
Constructors Constructor Description ProjectDocumentProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_indexProject(String workspaceName, Project project, org.apache.solr.client.solrj.SolrClient solrClient)
private void
_indexProjects(String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient)
void
contextualize(Context context)
void
indexDocuments(String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient)
Index additional documents for the given workspace.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_projectManager
protected ProjectManager _projectManager
The manager forProject
s
-
_solrProjectResourceIndexer
protected SolrProjectResourceIndexer _solrProjectResourceIndexer
The Solr indexer for project resources
-
_documentModule
protected DocumentWorkspaceModule _documentModule
The manager for documents
-
-
Constructor Detail
-
ProjectDocumentProvider
public ProjectDocumentProvider()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
indexDocuments
public void indexDocuments(String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws IndexingException
Description copied from interface:DocumentProvider
Index additional documents for the given workspace.- Specified by:
indexDocuments
in interfaceDocumentProvider
- Parameters:
workspaceName
- The workspace name.solrClient
- The solr client to use- Throws:
IndexingException
- If an error occurs indexing the documents.
-
_indexProjects
private void _indexProjects(String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws IndexingException
- Throws:
IndexingException
-
_indexProject
private void _indexProject(String workspaceName, Project project, org.apache.solr.client.solrj.SolrClient solrClient) throws IndexingException
- Throws:
IndexingException
-
-