* @throws SearchEngineException if there is a problem updating the indexes
* @throws IllegalArgumentException if the context is null, or if depth per read is not positive
*/
public SearchEngineIndexer indexAllWorkspaces() throws RepositorySourceException, SearchEngineException {
// Get the names of all the workspaces ...
GetWorkspacesRequest getWorkspaces = new GetWorkspacesRequest();
try {
channel.addAndAwait(getWorkspaces);
checkRequestForErrors(getWorkspaces);
} catch (InterruptedException e) {
// Clear the interrupted status of the thread and continue ...
Thread.interrupted();
return this;
}
// Index all of the workspaces ...
Path rootPath = context.getValueFactories().getPathFactory().createRootPath();
Location rootLocation = Location.create(rootPath);
for (String workspaceName : getWorkspaces.getAvailableWorkspaceNames()) {
index(workspaceName, rootLocation);
}
return this;
}