use of org.qi4j.entitystore.prefs.PreferencesEntityStoreInfo 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);
module.services(PreferencesEntityStoreService.class).setMetaInfo(info).visibleIn(visibility).instantiateOnStartup();
module.services(UuidIdentityGeneratorService.class).visibleIn(visibility);
}
use of org.qi4j.entitystore.prefs.PreferencesEntityStoreInfo in project qi4j-sdk by Qi4j.
the class PreferencesEntityStoreTest method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
module.layer().application().setName("PreferencesTest");
super.assemble(module);
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(null);
PreferencesEntityStoreInfo metaInfo = new PreferencesEntityStoreInfo(Preferences.userNodeForPackage(getClass()));
Thread.currentThread().setContextClassLoader(cl);
module.services(PreferencesEntityStoreService.class).setMetaInfo(metaInfo).instantiateOnStartup();
new OrgJsonValueSerializationAssembler().assemble(module);
}
Aggregations