public class SolrWorkspaceIndexer extends AbstractLogEnabled implements WorkspaceIndexer, Component, Serviceable, Contextualizable
Modifier and Type | Field and Description |
---|---|
protected Context |
_context
The component context.
|
protected DocumentProviderExtensionPoint |
_docProviderEP
Additional documents provider extension point.
|
protected Repository |
_repository
The repository.
|
protected SolrIndexer |
_solrIndexer
The solr indexer.
|
protected WorkspaceSelector |
_workspaceSelector
The workspace selector.
|
ROLE
Constructor and Description |
---|
SolrWorkspaceIndexer() |
Modifier and Type | Method and Description |
---|---|
private void |
_forceWorkspaceAndDoIndex(String workspaceName,
boolean sendSchema) |
private void |
_index(String workspaceName,
boolean ensureCoreExists,
boolean sendSchema) |
private void |
_sendSchema() |
void |
contextualize(Context context) |
protected void |
doIndex(String workspaceName)
Index the given workspace.
|
protected void |
ensureCoreExists(String coreName)
Create the given core if it doesn't exist.
|
protected void |
ensureCoresExists(String[] coreNames)
Create the given cores if they do not exist.
|
void |
index(String workspaceName)
Index a workspace.
|
protected void |
indexAdditionalDocuments(String workspaceName)
Index additional documents provided by the extensions.
|
void |
indexAllWorkspaces()
Index all the workspaces.
|
protected void |
reloadAclCache()
Asks Solr server to reload ACL Cache
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected Repository _repository
protected SolrIndexer _solrIndexer
protected WorkspaceSelector _workspaceSelector
protected DocumentProviderExtensionPoint _docProviderEP
public SolrWorkspaceIndexer()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void indexAllWorkspaces() throws IndexingException
WorkspaceIndexer
indexAllWorkspaces
in interface WorkspaceIndexer
IndexingException
- If an error occurs while indexing.private void _sendSchema() throws IndexingException
IndexingException
public void index(String workspaceName) throws IndexingException
WorkspaceIndexer
index
in interface WorkspaceIndexer
workspaceName
- The workspace name.IndexingException
- If an error occurs while indexing the workspace.private void _index(String workspaceName, boolean ensureCoreExists, boolean sendSchema) throws IndexingException
IndexingException
private void _forceWorkspaceAndDoIndex(String workspaceName, boolean sendSchema) throws IndexingException
IndexingException
protected void doIndex(String workspaceName) throws IndexingException
workspaceName
- The workspace name.IndexingException
- If an error occurs indexing the workspace.protected void reloadAclCache()
protected void indexAdditionalDocuments(String workspaceName) throws IndexingException
workspaceName
- The workspace name.IndexingException
- If an error occurs while indexing.protected void ensureCoresExists(String[] coreNames) throws IndexingException
coreNames
- The core names.IndexingException
- If an error occurs while checking if cores exist.protected void ensureCoreExists(String coreName) throws IndexingException
coreName
- The core name.IndexingException
- If an error occurs while checking if core exists.