use of org.qi4j.sample.dcicargo.pathfinder_b.internal.GraphDAO in project qi4j-sdk by Qi4j.
the class Assembler method assembleInfrastructureLayer.
private void assembleInfrastructureLayer(LayerAssembly infrastructureLayer) throws AssemblyException {
ModuleAssembly serializationModule = infrastructureLayer.module("INFRASTRUCTURE-Serialization");
serializationModule.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON).setMetaInfo(new Function<Application, Module>() {
@Override
public Module map(Application application) {
return application.findModule("CONTEXT", "CONTEXT-RoleMap");
}
}).visibleIn(application);
ModuleAssembly indexingModule = infrastructureLayer.module("INFRASTRUCTURE-Indexing");
indexingModule.objects(EntityStateSerializer.class, EntityTypeSerializer.class);
indexingModule.services(MemoryRepositoryService.class, RdfIndexingEngineService.class).instantiateOnStartup().visibleIn(application);
ModuleAssembly entityStoreModule = infrastructureLayer.module("INFRASTRUCTURE-EntityStore");
entityStoreModule.services(MemoryEntityStoreService.class, UuidIdentityGeneratorService.class).instantiateOnStartup().visibleIn(application);
ModuleAssembly externalServiceModule = infrastructureLayer.module("INFRASTRUCTURE-ExternalService");
externalServiceModule.importedServices(GraphTraversalService.class).setMetaInfo(new GraphTraversalServiceImpl(new GraphDAO())).visibleIn(application);
}
use of org.qi4j.sample.dcicargo.pathfinder_b.internal.GraphDAO in project qi4j-sdk by Qi4j.
the class TestAssembler method assembleInfrastructureLayer.
private void assembleInfrastructureLayer(LayerAssembly infrastructureLayer) throws AssemblyException {
ModuleAssembly serializationModule = infrastructureLayer.module("INFRASTRUCTURE-Serialization");
serializationModule.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON).setMetaInfo(new Function<Application, Module>() {
@Override
public Module map(Application application) {
return application.findModule("CONTEXT", "CONTEXT-RoleMap");
}
}).visibleIn(application);
ModuleAssembly indexingModule = infrastructureLayer.module("INFRASTRUCTURE-Indexing");
indexingModule.objects(EntityStateSerializer.class, EntityTypeSerializer.class);
indexingModule.services(MemoryRepositoryService.class, RdfIndexingEngineService.class).visibleIn(application).instantiateOnStartup();
ModuleAssembly entityStoreModule = infrastructureLayer.module("INFRASTRUCTURE-EntityStore");
entityStoreModule.addServices(MemoryEntityStoreService.class, UuidIdentityGeneratorService.class).visibleIn(application);
ModuleAssembly externalServiceModule = infrastructureLayer.module("INFRASTRUCTURE-ExternalService");
externalServiceModule.importedServices(GraphTraversalService.class).setMetaInfo(new GraphTraversalServiceImpl(new GraphDAO())).visibleIn(application);
}
Aggregations