Search in sources :

Example 1 with OrgJsonValueSerializationAssembler

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

the class JCloudsFilesystemTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    super.assemble(module);
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
    new JCloudsMapEntityStoreAssembler().withConfigIn(config, Visibility.layer).assemble(module);
    JCloudsMapEntityStoreConfiguration defaults = config.forMixin(JCloudsMapEntityStoreConfiguration.class).declareDefaults();
    defaults.provider().set("filesystem");
    Map<String, String> props = new HashMap<String, String>();
    props.put(FilesystemConstants.PROPERTY_BASEDIR, "build/tmp/" + getClass().getPackage().getName() + "/es-jclouds-" + System.currentTimeMillis());
    defaults.properties().set(props);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) HashMap(java.util.HashMap) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 2 with OrgJsonValueSerializationAssembler

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

the class HazelcastEntityStoreTest method assemble.

@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
    // END SNIPPET: assembly
    super.assemble(module);
    ModuleAssembly configModule = module.layer().module("config");
    new EntityTestAssembler().assemble(configModule);
    new OrgJsonValueSerializationAssembler().assemble(module);
    // START SNIPPET: assembly
    new HazelcastEntityStoreAssembler().withConfigIn(configModule, Visibility.layer).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler) HazelcastEntityStoreAssembler(org.qi4j.entitystore.hazelcast.assembly.HazelcastEntityStoreAssembler)

Example 3 with OrgJsonValueSerializationAssembler

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

the class FileEntityStoreTest method assemble.

@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
    // END SNIPPET: assembly
    super.assemble(module);
    module.services(FileConfigurationService.class);
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    // START SNIPPET: assembly
    new OrgJsonValueSerializationAssembler().assemble(module);
    new FileEntityStoreAssembler().assemble(module);
    config.entities(FileEntityStoreConfiguration.class).visibleIn(Visibility.layer);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) FileEntityStoreAssembler(org.qi4j.entitystore.file.assembly.FileEntityStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 4 with OrgJsonValueSerializationAssembler

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

the class JdbmEntityStoreTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    super.assemble(module);
    module.services(FileConfigurationService.class).instantiateOnStartup();
    new JdbmEntityStoreAssembler(Visibility.module).assemble(module);
    ModuleAssembly config = module.layer().module("config");
    config.entities(JdbmConfiguration.class).visibleIn(Visibility.layer);
    new EntityTestAssembler().assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) JdbmEntityStoreAssembler(org.qi4j.entitystore.jdbm.assembly.JdbmEntityStoreAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 5 with OrgJsonValueSerializationAssembler

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

the class DocumentationSupport method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    // (2)
    module.values(SomeValue.class);
    // END SNIPPET: default
    // (3)
    new OrgJsonValueSerializationAssembler().assemble(module);
// START SNIPPET: default
}
Also used : 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