Search in sources :

Example 16 with ServiceDeclaration

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

the class FileEntityStoreAssembler method assemble.

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

Example 17 with ServiceDeclaration

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

the class HazelcastEntityStoreAssembler method assemble.

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

Example 18 with ServiceDeclaration

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

the class JCloudsMapEntityStoreAssembler method assemble.

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

Example 19 with ServiceDeclaration

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

the class RiakHttpMapEntityStoreAssembler method assemble.

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

Example 20 with ServiceDeclaration

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

the class PasswordDomainAssembler method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.entities(PasswordSecurable.class).visibleIn(visibility());
    ServiceDeclaration service = module.services(PasswordRealmService.class).instantiateOnStartup().visibleIn(visibility());
    if (hasIdentity()) {
        service.identifiedBy(identity());
    }
    if (hasConfig()) {
        configModule().entities(PasswordRealmConfiguration.class).visibleIn(configVisibility());
    }
}
Also used : PasswordSecurable(org.qi4j.library.shiro.domain.passwords.PasswordSecurable) ServiceDeclaration(org.qi4j.bootstrap.ServiceDeclaration) PasswordRealmConfiguration(org.qi4j.library.shiro.domain.passwords.PasswordRealmConfiguration)

Aggregations

ServiceDeclaration (org.qi4j.bootstrap.ServiceDeclaration)20 UuidIdentityGeneratorService (org.qi4j.spi.uuid.UuidIdentityGeneratorService)11 Test (org.junit.Test)2 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)2 SingletonAssembler (org.qi4j.bootstrap.SingletonAssembler)2 Preferences (java.util.prefs.Preferences)1 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 PreferencesEntityStoreInfo (org.qi4j.entitystore.prefs.PreferencesEntityStoreInfo)1 PreferencesEntityStoreService (org.qi4j.entitystore.prefs.PreferencesEntityStoreService)1 VoldemortConfiguration (org.qi4j.entitystore.voldemort.VoldemortConfiguration)1