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());
}
}
use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.
the class VoldemortAssembler method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
module.services(UuidIdentityGeneratorService.class).visibleIn(visibility());
ServiceDeclaration service = module.services(VoldemortEntityStoreService.class).visibleIn(visibility()).instantiateOnStartup();
if (hasIdentity()) {
service.identifiedBy(identity());
}
if (hasConfig()) {
configModule().entities(VoldemortConfiguration.class).visibleIn(configVisibility());
}
}
use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.
the class PreferenceEntityStoreAssembler method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
String applicationName = module.layer().application().name();
Preferences root = Preferences.userRoot();
Preferences node = root.node(applicationName);
PreferencesEntityStoreInfo info = new PreferencesEntityStoreInfo(node);
ServiceDeclaration service = module.services(PreferencesEntityStoreService.class).setMetaInfo(info).visibleIn(visibility()).instantiateOnStartup();
if (hasIdentity()) {
service.identifiedBy(identity());
}
module.services(UuidIdentityGeneratorService.class).visibleIn(visibility());
}
use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.
the class RedisMapEntityStoreAssembler method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
module.services(UuidIdentityGeneratorService.class).visibleIn(visibility());
ServiceDeclaration service = module.services(RedisMapEntityStoreService.class).visibleIn(visibility());
if (hasIdentity()) {
service.identifiedBy(identity());
}
if (hasConfig()) {
configModule().entities(RedisEntityStoreConfiguration.class).visibleIn(configVisibility());
}
}
use of org.qi4j.bootstrap.ServiceDeclaration in project qi4j-sdk by Qi4j.
the class AlarmSystemAssembler method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
ServiceDeclaration alarmSystem = module.services(AlarmSystemService.class).visibleIn(visibility());
if (hasIdentity()) {
alarmSystem.identifiedBy(identity());
}
module.services(SimpleAlarmModelService.class).setMetaInfo(new AlarmModelDescriptor("Simple", false));
module.services(StandardAlarmModelService.class).setMetaInfo(new AlarmModelDescriptor("Standard", true));
module.services(ExtendedAlarmModelService.class).setMetaInfo(new AlarmModelDescriptor("Extended", false));
module.services(AlarmPointFactory.class);
module.entities(AlarmPointEntity.class);
module.values(AlarmEvent.class);
module.values(AlarmStatus.class);
module.values(AlarmCategory.class);
module.values(SimpleAlarmCategory.class);
module.transients(AlarmProxy.class);
module.services(AlarmProxy.Factory.class);
module.forMixin(AlarmPoint.class).declareDefaults().alarmClass().set(AlarmClass.B);
}
Aggregations