Search in sources :

Example 21 with OrgJsonValueSerializationAssembler

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

the class RedisMapEntityStoreTest 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");
    new EntityTestAssembler().assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
    // START SNIPPET: assembly
    new RedisMapEntityStoreAssembler().withConfigModule(config).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 22 with OrgJsonValueSerializationAssembler

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

the class MySQLEntityStoreTest 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");
    new EntityTestAssembler().assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
    // START SNIPPET: assembly
    // DataSourceService
    new DBCPDataSourceServiceAssembler().identifiedBy("mysql-datasource-service").visibleIn(Visibility.module).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
    // DataSource
    new DataSourceAssembler().withDataSourceServiceIdentity("mysql-datasource-service").identifiedBy("mysql-datasource").visibleIn(Visibility.module).withCircuitBreaker().assemble(module);
    // SQL EntityStore
    new MySQLEntityStoreAssembler().visibleIn(Visibility.application).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) MySQLEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.MySQLEntityStoreAssembler) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 23 with OrgJsonValueSerializationAssembler

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

the class PostgreSQLEntityStoreTest 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");
    new EntityTestAssembler().assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
    // START SNIPPET: assembly
    // DataSourceService
    new DBCPDataSourceServiceAssembler().identifiedBy("postgresql-datasource-service").visibleIn(Visibility.module).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
    // DataSource
    new DataSourceAssembler().withDataSourceServiceIdentity("postgresql-datasource-service").identifiedBy("postgresql-datasource").visibleIn(Visibility.module).withCircuitBreaker();
    // SQL EntityStore
    new PostgreSQLEntityStoreAssembler().visibleIn(Visibility.application).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) PostgreSQLEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.PostgreSQLEntityStoreAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 24 with OrgJsonValueSerializationAssembler

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

the class JdbmEventStoreServiceTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.layer().application().setName("JDBMEventStoreTest");
    new EntityTestAssembler().assemble(module);
    module.values(DomainEventValue.class, UnitOfWorkDomainEventsValue.class);
    module.services(FileConfigurationService.class);
    new OrgJsonValueSerializationAssembler().assemble(module);
    module.services(JdbmEventStoreService.class);
    module.services(DomainEventFactoryService.class);
    module.importedServices(CurrentUserUoWPrincipal.class).importedBy(ImportedServiceDeclaration.NEW_OBJECT);
    module.objects(CurrentUserUoWPrincipal.class);
    module.entities(TestEntity.class).withConcerns(DomainEventCreationConcern.class);
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler) CurrentUserUoWPrincipal(org.qi4j.library.eventsourcing.domain.factory.CurrentUserUoWPrincipal) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 25 with OrgJsonValueSerializationAssembler

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

the class ContextResourceClientFactoryTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    // General setup of client and server
    new OrgJsonValueSerializationAssembler().assemble(module);
    new ClientAssembler().assemble(module);
    new ValueAssembler().assemble(module);
    new RestServerAssembler().assemble(module);
    module.objects(NullCommandResult.class);
    module.importedServices(CommandResult.class).importedBy(NEW_OBJECT);
    module.importedServices(MetadataService.class).importedBy(NEW_OBJECT);
    module.objects(MetadataService.class);
    // Test specific setup
    module.values(TestQuery.class, TestResult.class, TestCommand.class);
    module.forMixin(TestQuery.class).declareDefaults().abc().set("def");
    module.objects(RootRestlet.class, RootResource.class, RootContext.class, SubResource1.class, PagesResource.class);
    module.objects(DescribableContext.class);
    module.transients(TestComposite.class);
}
Also used : RestServerAssembler(org.qi4j.library.rest.server.assembler.RestServerAssembler) ValueAssembler(org.qi4j.library.rest.common.ValueAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler) MetadataService(org.restlet.service.MetadataService) NullCommandResult(org.qi4j.library.rest.server.restlet.NullCommandResult) CommandResult(org.qi4j.library.rest.server.spi.CommandResult)

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