Search in sources :

Example 1 with Visibility

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();
    }
}
Also used : Visibility(org.qi4j.api.common.Visibility) LinkedList(java.util.LinkedList)

Example 2 with Visibility

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
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ESMemoryIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESMemoryIndexQueryAssembler) ESFilesystemIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler) ESClusterIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESClusterIndexQueryAssembler) Visibility(org.qi4j.api.common.Visibility)

Aggregations

Visibility (org.qi4j.api.common.Visibility)2 LinkedList (java.util.LinkedList)1 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)1 ESClusterIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESClusterIndexQueryAssembler)1 ESFilesystemIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler)1 ESMemoryIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESMemoryIndexQueryAssembler)1