use of org.qi4j.api.common.Visibility in project qi4j-sdk by Qi4j.
the class ServiceDetailDescriptor method accessibleToLayers.
/**
* @return layers that can access this service. Never return {@code null}.
*/
public final List<LayerDetailDescriptor> accessibleToLayers() {
Visibility visibility = descriptor.visibility();
if (visibility == Visibility.module) {
return new LinkedList<>();
}
LayerDetailDescriptor layer = module.layer();
if (visibility == Visibility.layer) {
List<LayerDetailDescriptor> layers = new LinkedList<>();
layers.add(layer);
return layers;
} else {
return layer.usedBy();
}
}
use of org.qi4j.api.common.Visibility in project qi4j-sdk by Qi4j.
the class DocumentationSupport method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
ModuleAssembly configModule = module;
Visibility configVisibility = Visibility.module;
// START SNIPPET: memory
new ESMemoryIndexQueryAssembler().withConfig(configModule, configVisibility).assemble(module);
// END SNIPPET: memory
// START SNIPPET: filesystem
new ESFilesystemIndexQueryAssembler().withConfig(configModule, configVisibility).assemble(module);
// END SNIPPET: filesystem
// START SNIPPET: cluster
new ESClusterIndexQueryAssembler().withConfig(configModule, configVisibility).assemble(module);
// END SNIPPET: cluster
}
Aggregations