use of org.olat.search.service.indexer.FolderIndexerWorker in project OpenOLAT by OpenOLAT.
the class TaxonomyLevelLibraryIndexer method doIndex.
@Override
public void doIndex(SearchResourceContext parentResourceContext, Object object, OlatFullIndexer indexerWriter) throws IOException, InterruptedException {
if (object instanceof TaxonomyLevel) {
TaxonomyLevel level = (TaxonomyLevel) object;
VFSContainer library = taxonomyService.getDocumentsLibrary(level);
if (library != null) {
SearchResourceContext searchResourceContext = new SearchResourceContext(parentResourceContext);
searchResourceContext.setBusinessControlFor(level);
searchResourceContext.setTitle(level.getDisplayName());
searchResourceContext.setDescription(level.getDescription());
searchResourceContext.setLastModified(level.getLastModified());
searchResourceContext.setCreatedDate(level.getCreationDate());
FolderIndexerWorker runnableFolderIndexer = new FolderIndexerWorker();
runnableFolderIndexer.setAccessRule(FolderIndexerAccess.FULL_ACCESS);
runnableFolderIndexer.setParentResourceContext(searchResourceContext);
runnableFolderIndexer.setContainer(library);
runnableFolderIndexer.setIndexWriter(indexerWriter);
runnableFolderIndexer.setFilePath("");
indexerWriter.submit(runnableFolderIndexer);
}
}
}
use of org.olat.search.service.indexer.FolderIndexerWorker in project openolat by klemens.
the class TaxonomyLevelLibraryIndexer method doIndex.
@Override
public void doIndex(SearchResourceContext parentResourceContext, Object object, OlatFullIndexer indexerWriter) throws IOException, InterruptedException {
if (object instanceof TaxonomyLevel) {
TaxonomyLevel level = (TaxonomyLevel) object;
VFSContainer library = taxonomyService.getDocumentsLibrary(level);
if (library != null) {
SearchResourceContext searchResourceContext = new SearchResourceContext(parentResourceContext);
searchResourceContext.setBusinessControlFor(level);
searchResourceContext.setTitle(level.getDisplayName());
searchResourceContext.setDescription(level.getDescription());
searchResourceContext.setLastModified(level.getLastModified());
searchResourceContext.setCreatedDate(level.getCreationDate());
FolderIndexerWorker runnableFolderIndexer = new FolderIndexerWorker();
runnableFolderIndexer.setAccessRule(FolderIndexerAccess.FULL_ACCESS);
runnableFolderIndexer.setParentResourceContext(searchResourceContext);
runnableFolderIndexer.setContainer(library);
runnableFolderIndexer.setIndexWriter(indexerWriter);
runnableFolderIndexer.setFilePath("");
indexerWriter.submit(runnableFolderIndexer);
}
}
}
use of org.olat.search.service.indexer.FolderIndexerWorker in project openolat by klemens.
the class TaxonomyTemplatesLibraryIndexer method doIndex.
@Override
public void doIndex(SearchResourceContext parentResourceContext, Object parentObject, OlatFullIndexer indexerWriter) throws IOException, InterruptedException {
Taxonomy taxonomy = (Taxonomy) parentObject;
VFSContainer templatesContainer = taxonomyService.getDocumentsLibrary(taxonomy);
if (templatesContainer != null) {
SearchResourceContext searchResourceContext = new SearchResourceContext(parentResourceContext);
OLATResourceable templateOres = OresHelper.createOLATResourceableInstance(getSupportedTypeName(), 0l);
searchResourceContext.setBusinessControlFor(templateOres);
FolderIndexerWorker runnableFolderIndexer = new FolderIndexerWorker();
runnableFolderIndexer.setAccessRule(FolderIndexerAccess.FULL_ACCESS);
runnableFolderIndexer.setParentResourceContext(searchResourceContext);
runnableFolderIndexer.setContainer(templatesContainer);
runnableFolderIndexer.setIndexWriter(indexerWriter);
runnableFolderIndexer.setFilePath("");
indexerWriter.submit(runnableFolderIndexer);
}
}
use of org.olat.search.service.indexer.FolderIndexerWorker in project OpenOLAT by OpenOLAT.
the class TaxonomyTemplatesLibraryIndexer method doIndex.
@Override
public void doIndex(SearchResourceContext parentResourceContext, Object parentObject, OlatFullIndexer indexerWriter) throws IOException, InterruptedException {
Taxonomy taxonomy = (Taxonomy) parentObject;
VFSContainer templatesContainer = taxonomyService.getDocumentsLibrary(taxonomy);
if (templatesContainer != null) {
SearchResourceContext searchResourceContext = new SearchResourceContext(parentResourceContext);
OLATResourceable templateOres = OresHelper.createOLATResourceableInstance(getSupportedTypeName(), 0l);
searchResourceContext.setBusinessControlFor(templateOres);
FolderIndexerWorker runnableFolderIndexer = new FolderIndexerWorker();
runnableFolderIndexer.setAccessRule(FolderIndexerAccess.FULL_ACCESS);
runnableFolderIndexer.setParentResourceContext(searchResourceContext);
runnableFolderIndexer.setContainer(templatesContainer);
runnableFolderIndexer.setIndexWriter(indexerWriter);
runnableFolderIndexer.setFilePath("");
indexerWriter.submit(runnableFolderIndexer);
}
}
Aggregations