Search in sources :

Example 1 with FileConfigurationOverride

use of org.qi4j.library.fileconfig.FileConfigurationOverride in project qi4j-sdk by Qi4j.

the class ElasticSearchFinderTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    super.assemble(module);
    // Config module
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    // Index/Query
    new ESFilesystemIndexQueryAssembler().withConfig(config, Visibility.layer).assemble(module);
    ElasticSearchConfiguration esConfig = config.forMixin(ElasticSearchConfiguration.class).declareDefaults();
    esConfig.indexNonAggregatedAssociations().set(Boolean.TRUE);
    // FileConfig
    FileConfigurationOverride override = new FileConfigurationOverride().withData(new File(DATA_DIR, "qi4j-data")).withLog(new File(DATA_DIR, "qi4j-logs")).withTemporary(new File(DATA_DIR, "qi4j-temp"));
    module.services(FileConfigurationService.class).setMetaInfo(override);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ESFilesystemIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler) FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride) File(java.io.File) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride)

Example 2 with FileConfigurationOverride

use of org.qi4j.library.fileconfig.FileConfigurationOverride in project qi4j-sdk by Qi4j.

the class ElasticSearchQueryTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    super.assemble(module);
    // Config module
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    // Index/Query
    new ESFilesystemIndexQueryAssembler().withConfig(config, Visibility.layer).assemble(module);
    ElasticSearchConfiguration esConfig = config.forMixin(ElasticSearchConfiguration.class).declareDefaults();
    esConfig.indexNonAggregatedAssociations().set(Boolean.TRUE);
    // FileConfig
    FileConfigurationOverride override = new FileConfigurationOverride().withData(new File(DATA_DIR, "qi4j-data")).withLog(new File(DATA_DIR, "qi4j-logs")).withTemporary(new File(DATA_DIR, "qi4j-temp"));
    module.services(FileConfigurationService.class).setMetaInfo(override);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ESFilesystemIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler) FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride) File(java.io.File) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride)

Example 3 with FileConfigurationOverride

use of org.qi4j.library.fileconfig.FileConfigurationOverride in project qi4j-sdk by Qi4j.

the class ElasticSearchTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    // Config module
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    // EntityStore
    new EntityTestAssembler().assemble(module);
    // Index/Query
    new ESFilesystemIndexQueryAssembler().withConfig(config, Visibility.layer).assemble(module);
    ElasticSearchConfiguration esConfig = config.forMixin(ElasticSearchConfiguration.class).declareDefaults();
    esConfig.indexNonAggregatedAssociations().set(Boolean.TRUE);
    // FileConfig
    FileConfigurationOverride override = new FileConfigurationOverride().withData(new File(DATA_DIR, "qi4j-data")).withLog(new File(DATA_DIR, "qi4j-logs")).withTemporary(new File(DATA_DIR, "qi4j-temp"));
    module.services(FileConfigurationService.class).setMetaInfo(override);
    // Entities & Values
    module.entities(Post.class, Page.class, Author.class, Comment.class);
    module.values(Tagline.class);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ESFilesystemIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler) FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride) File(java.io.File) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride)

Example 4 with FileConfigurationOverride

use of org.qi4j.library.fileconfig.FileConfigurationOverride in project qi4j-sdk by Qi4j.

the class ImmenseTermTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    // Config module
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    // EntityStore
    new EntityTestAssembler().assemble(module);
    // Index/Query
    new ESFilesystemIndexQueryAssembler().withConfig(config, Visibility.layer).assemble(module);
    ElasticSearchConfiguration esConfig = config.forMixin(ElasticSearchConfiguration.class).declareDefaults();
    esConfig.indexNonAggregatedAssociations().set(Boolean.TRUE);
    // FileConfig
    FileConfigurationOverride override = new FileConfigurationOverride().withData(new File(DATA_DIR, "qi4j-data")).withLog(new File(DATA_DIR, "qi4j-logs")).withTemporary(new File(DATA_DIR, "qi4j-temp"));
    module.services(FileConfigurationService.class).setMetaInfo(override);
    // Entities & Values
    module.entities(TestEntity.class, TestEntity2.class);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ESFilesystemIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler) FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride) File(java.io.File) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride)

Example 5 with FileConfigurationOverride

use of org.qi4j.library.fileconfig.FileConfigurationOverride in project qi4j-sdk by Qi4j.

the class SolrQueryServiceTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.layer().application().setMode(Application.Mode.test);
    FileConfigurationOverride override = new FileConfigurationOverride().withData(new File(DATA_DIR, "qi4j-data")).withLog(new File(DATA_DIR, "qi4j-logs")).withTemporary(new File(DATA_DIR, "qi4j-temp"));
    module.services(FileConfigurationService.class).setMetaInfo(override);
    new EntityTestAssembler().assemble(module);
    // START SNIPPET: assembly
    new SolrAssembler().assemble(module);
    // END SNIPPET: assembly
    module.entities(TestEntity.class);
}
Also used : FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride) File(java.io.File) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride)

Aggregations

File (java.io.File)9 FileConfigurationOverride (org.qi4j.library.fileconfig.FileConfigurationOverride)9 FileConfigurationService (org.qi4j.library.fileconfig.FileConfigurationService)9 EntityTestAssembler (org.qi4j.test.EntityTestAssembler)6 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)5 ESFilesystemIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler)5