use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class H2SQLEntityStoreTest 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("h2-datasource-service").visibleIn(Visibility.module).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
// DataSource
new DataSourceAssembler().withDataSourceServiceIdentity("h2-datasource-service").identifiedBy("h2-datasource").visibleIn(Visibility.module).withCircuitBreaker().assemble(module);
// SQL EntityStore
new H2SQLEntityStoreAssembler().visibleIn(Visibility.application).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class EntitySerializerTest method assemble.
public void assemble(ModuleAssembly module) throws AssemblyException {
new EntityTestAssembler().assemble(module);
new OrgJsonValueSerializationAssembler().assemble(module);
module.entities(TestEntity.class);
module.values(TestValue.class, Test2Value.class);
module.objects(EntityStateSerializer.class, EntitySerializerTest.class);
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class ContinuousIntegrationTest 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(BuildSpec.class, BuildResult.class, ServerStatus.class, TagBuildCommand.class, RunBuildCommand.class);
module.objects(RootRestlet.class, RootResource.class, RootContext.class);
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class MemoryEntityStorePerformanceTest method createAssembler.
private static Assembler createAssembler() {
return new Assembler() {
public void assemble(ModuleAssembly module) throws AssemblyException {
module.services(MemoryEntityStoreService.class);
// module.services( MemoryEntityStoreService2.class );
module.services(UuidIdentityGeneratorService.class);
new OrgJsonValueSerializationAssembler().assemble(module);
}
};
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class StorageModule method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
module.services(MemoryEntityStoreService.class).visibleIn(Visibility.application);
module.services(UuidIdentityGeneratorService.class).visibleIn(Visibility.application);
new OrgJsonValueSerializationAssembler().visibleIn(Visibility.application).withValuesModuleFinder(new Function<Application, Module>() {
@Override
public Module map(Application app) {
return app.findModule("DomainLayer", "RentalModule");
}
}).assemble(module);
}
Aggregations