Search in sources :

Example 1 with ServiceDeclaration

use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.

the class EntityTestAssembler method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    ServiceDeclaration service = module.services(MemoryEntityStoreService.class).visibleIn(visibility());
    if (hasIdentity()) {
        service.identifiedBy(identity());
    }
    module.services(UuidIdentityGeneratorService.class).visibleIn(visibility());
    module.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON);
}
Also used : MemoryEntityStoreService(org.qi4j.entitystore.memory.MemoryEntityStoreService) UuidIdentityGeneratorService(org.qi4j.spi.uuid.UuidIdentityGeneratorService) ServiceDeclaration(org.qi4j.bootstrap.ServiceDeclaration) OrgJsonValueSerializationService(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService)

Example 2 with ServiceDeclaration

use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.

the class RiakProtobufMapEntityStoreAssembler method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(UuidIdentityGeneratorService.class).visibleIn(visibility());
    ServiceDeclaration service = module.services(RiakMapEntityStoreService.class).withMixins(RiakProtobufMapEntityStoreMixin.class).visibleIn(visibility());
    if (hasIdentity()) {
        service.identifiedBy(identity());
    }
    if (hasConfig()) {
        configModule().entities(RiakProtobufEntityStoreConfiguration.class).visibleIn(configVisibility());
    }
}
Also used : UuidIdentityGeneratorService(org.qi4j.spi.uuid.UuidIdentityGeneratorService) ServiceDeclaration(org.qi4j.bootstrap.ServiceDeclaration)

Example 3 with ServiceDeclaration

use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.

the class JdbmEntityStoreAssembler method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(JdbmEntityStoreService.class).visibleIn(visibility());
    ServiceDeclaration service = module.services(UuidIdentityGeneratorService.class).visibleIn(visibility());
    if (hasIdentity()) {
        service.identifiedBy(identity());
    }
    if (hasConfig()) {
        configModule().entities(JdbmConfiguration.class).visibleIn(configVisibility());
    }
}
Also used : UuidIdentityGeneratorService(org.qi4j.spi.uuid.UuidIdentityGeneratorService) JdbmConfiguration(org.qi4j.entitystore.jdbm.JdbmConfiguration) JdbmEntityStoreService(org.qi4j.entitystore.jdbm.JdbmEntityStoreService) ServiceDeclaration(org.qi4j.bootstrap.ServiceDeclaration)

Example 4 with ServiceDeclaration

use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.

the class LevelDBEntityStoreAssembler method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(UuidIdentityGeneratorService.class);
    ServiceDeclaration service = module.services(LevelDBEntityStoreService.class).visibleIn(visibility());
    if (hasIdentity()) {
        service.identifiedBy(identity());
    }
    if (hasConfig()) {
        configModule().entities(LevelDBEntityStoreConfiguration.class).visibleIn(configVisibility());
    }
}
Also used : ServiceDeclaration(org.qi4j.bootstrap.ServiceDeclaration)

Example 5 with ServiceDeclaration

use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.

the class MemoryEntityStoreAssembler method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(UuidIdentityGeneratorService.class).visibleIn(visibility());
    ServiceDeclaration service = module.services(MemoryEntityStoreService.class).visibleIn(visibility());
    if (hasIdentity()) {
        service.identifiedBy(identity());
    }
}
Also used : UuidIdentityGeneratorService(org.qi4j.spi.uuid.UuidIdentityGeneratorService) ServiceDeclaration(org.qi4j.bootstrap.ServiceDeclaration)

Aggregations

ServiceDeclaration (org.qi4j.bootstrap.ServiceDeclaration)19 UuidIdentityGeneratorService (org.qi4j.spi.uuid.UuidIdentityGeneratorService)10 Test (org.junit.Test)2 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)2 SingletonAssembler (org.qi4j.bootstrap.SingletonAssembler)2 ApplicationAssembly (org.qi4j.bootstrap.ApplicationAssembly)1 EntityDeclaration (org.qi4j.bootstrap.EntityDeclaration)1 ImportedServiceDeclaration (org.qi4j.bootstrap.ImportedServiceDeclaration)1 LayerAssembly (org.qi4j.bootstrap.LayerAssembly)1 ValueDeclaration (org.qi4j.bootstrap.ValueDeclaration)1 FileEntityStoreConfiguration (org.qi4j.entitystore.file.FileEntityStoreConfiguration)1 FileEntityStoreService (org.qi4j.entitystore.file.FileEntityStoreService)1 HazelcastConfiguration (org.qi4j.entitystore.hazelcast.HazelcastConfiguration)1 JdbmConfiguration (org.qi4j.entitystore.jdbm.JdbmConfiguration)1 JdbmEntityStoreService (org.qi4j.entitystore.jdbm.JdbmEntityStoreService)1 MemoryEntityStoreService (org.qi4j.entitystore.memory.MemoryEntityStoreService)1 VoldemortConfiguration (org.qi4j.entitystore.voldemort.VoldemortConfiguration)1 SchedulerConfiguration (org.qi4j.library.scheduler.SchedulerConfiguration)1 Timeline (org.qi4j.library.scheduler.timeline.Timeline)1 TimelineScheduleMixin (org.qi4j.library.scheduler.timeline.TimelineScheduleMixin)1