Search in sources :

Example 16 with OrgJsonValueSerializationAssembler

use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.

the class PreferencesEntityStoreTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.layer().application().setName("PreferencesTest");
    super.assemble(module);
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    Thread.currentThread().setContextClassLoader(null);
    PreferencesEntityStoreInfo metaInfo = new PreferencesEntityStoreInfo(Preferences.userNodeForPackage(getClass()));
    Thread.currentThread().setContextClassLoader(cl);
    module.services(PreferencesEntityStoreService.class).setMetaInfo(metaInfo).instantiateOnStartup();
    new OrgJsonValueSerializationAssembler().assemble(module);
}
Also used : PreferencesEntityStoreInfo(org.qi4j.entitystore.prefs.PreferencesEntityStoreInfo) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 17 with OrgJsonValueSerializationAssembler

use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.

the class JniLevelDBEntityStoreTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    super.assemble(module);
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler(Visibility.module).assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
    module.services(FileConfigurationService.class);
    new LevelDBEntityStoreAssembler().withConfig(config, Visibility.layer).identifiedBy("jni-leveldb-entitystore").assemble(module);
    config.forMixin(LevelDBEntityStoreConfiguration.class).declareDefaults().flavour().set("jni");
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 18 with OrgJsonValueSerializationAssembler

use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.

the class MemoryEntityStoreTest method assemble.

// START SNIPPET: assembly
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    new MemoryEntityStoreAssembler().assemble(module);
    // END SNIPPET: assembly
    new OrgJsonValueSerializationAssembler().assemble(module);
    super.assemble(module);
// START SNIPPET: assembly
}
Also used : OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 19 with OrgJsonValueSerializationAssembler

use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.

the class MongoMapEntityStoreTest method assemble.

@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
    // END SNIPPET: assembly
    super.assemble(module);
    ModuleAssembly config = module.layer().module("config");
    config.services(MemoryEntityStoreService.class);
    new OrgJsonValueSerializationAssembler().assemble(module);
    // START SNIPPET: assembly
    new MongoMapEntityStoreAssembler().withConfigModule(config).assemble(module);
    // END SNIPPET: assembly
    MongoEntityStoreConfiguration mongoConfig = config.forMixin(MongoEntityStoreConfiguration.class).declareDefaults();
    mongoConfig.writeConcern().set(MongoEntityStoreConfiguration.WriteConcern.FSYNC_SAFE);
    mongoConfig.database().set("qi4j:test");
    mongoConfig.collection().set("qi4j:test:entities");
// START SNIPPET: assembly
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 20 with OrgJsonValueSerializationAssembler

use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.

the class SimpleNeoStoreTest method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    module.layer().application().setName("SimpleNeoTest");
    super.assemble(module);
    module.services(FileConfigurationService.class);
    module.services(NeoEntityStoreService.class);
    ModuleAssembly configModule = module.layer().module("config");
    configModule.entities(NeoConfiguration.class).visibleIn(Visibility.layer);
    new EntityTestAssembler().assemble(configModule);
    new OrgJsonValueSerializationAssembler().assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) NeoConfiguration(org.qi4j.entitystore.neo4j.NeoConfiguration) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Aggregations

OrgJsonValueSerializationAssembler (org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)31 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)20 EntityTestAssembler (org.qi4j.test.EntityTestAssembler)20 DataSourceAssembler (org.qi4j.library.sql.assembly.DataSourceAssembler)5 DBCPDataSourceServiceAssembler (org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler)5 ValueAssembler (org.qi4j.library.rest.common.ValueAssembler)3 Application (org.qi4j.api.structure.Application)2 Assembler (org.qi4j.bootstrap.Assembler)2 JdbmEntityStoreAssembler (org.qi4j.entitystore.jdbm.assembly.JdbmEntityStoreAssembler)2 Function (org.qi4j.functional.Function)2 RestServerAssembler (org.qi4j.library.rest.server.assembler.RestServerAssembler)2 NullCommandResult (org.qi4j.library.rest.server.restlet.NullCommandResult)2 CommandResult (org.qi4j.library.rest.server.spi.CommandResult)2 MetadataService (org.restlet.service.MetadataService)2 HashMap (java.util.HashMap)1 Test (org.junit.Test)1 Module (org.qi4j.api.structure.Module)1 ApplicationAssembler (org.qi4j.bootstrap.ApplicationAssembler)1 ApplicationAssembly (org.qi4j.bootstrap.ApplicationAssembly)1 ApplicationAssemblyFactory (org.qi4j.bootstrap.ApplicationAssemblyFactory)1