use of com.eden.orchid.api.resources.resource.FreeableResource in project Orchid by JavaEden.
the class OrchidGenerators method indexGenerator.
private void indexGenerator(OrchidGenerator generator) {
Clog.d("Indexing generator: #{$1}:[#{$2 | className}]", generator.getPriority(), generator);
List<? extends OrchidPage> generatorPages = generator.startIndexing();
if (!EdenUtils.isEmpty(generator.getName()) && generatorPages != null && generatorPages.size() > 0) {
OrchidInternalIndex index = new OrchidInternalIndex(generator.getName());
for (OrchidPage page : generatorPages) {
index.addToIndex(generator.getName() + "/" + page.getReference().getPath(), page);
if (page.getResource() instanceof FreeableResource) {
((FreeableResource) page.getResource()).free();
}
}
this.internalIndex.addChildIndex(generator.getName(), index);
}
}
Aggregations