use of com.ramussoft.common.PluginFactory in project ramus by Vitaliy-Yakovchuk.
the class Client method createPluginFactory.
private PluginFactory createPluginFactory(List<PluginProvider> list) {
ArrayList<Plugin> plugins = new ArrayList<Plugin>();
for (PluginProvider suit : list) {
plugins.addAll(suit.getPlugins());
}
PluginFactory factory = new PluginFactory(plugins);
return factory;
}
use of com.ramussoft.common.PluginFactory in project ramus by Vitaliy-Yakovchuk.
the class MemoryDatabase method createJournaledEngine.
private JournaledEngine createJournaledEngine(PluginFactory factory, PersistentFactory persistentFactory) throws ClassNotFoundException {
if (cached) {
JournaledEngine journaledEngine2 = new JournaledEngine(factory, impl, persistentFactory.getRows(), journalFactory, accessor) {
@Override
protected void initPlugins(PluginFactory pluginFactory, AccessRules accessor) {
}
};
CachedEngine cachedEngine = new CachedEngine(journaledEngine2);
for (Plugin plugin : factory.getPlugins()) plugin.init(cachedEngine, accessor);
this.engine = cachedEngine;
return journaledEngine2;
} else {
JournaledEngine journaledEngine2 = new JournaledEngine(factory, impl, persistentFactory.getRows(), journalFactory, accessor);
this.engine = journaledEngine2;
return journaledEngine2;
}
}
use of com.ramussoft.common.PluginFactory in project ramus by Vitaliy-Yakovchuk.
the class AbstractDatabase method createPluginFactory.
protected PluginFactory createPluginFactory(List<PluginProvider> list) {
ArrayList<Plugin> plugins = new ArrayList<Plugin>();
for (PluginProvider suit : list) {
plugins.addAll(suit.getPlugins());
}
PluginFactory factory = new PluginFactory(plugins);
return factory;
}
use of com.ramussoft.common.PluginFactory in project ramus by Vitaliy-Yakovchuk.
the class NDataPluginFactory method createTemplateDataPlugin.
private static DataPlugin createTemplateDataPlugin() {
MemoryDatabase database = new MemoryDatabase() {
@Override
protected Collection<? extends PluginProvider> getAdditionalSuits() {
ArrayList<PluginProvider> ps = new ArrayList<PluginProvider>(1);
ps.add(new IDEF0PluginProvider());
return ps;
}
@Override
protected String getJournalDirectoryName(String tmp) {
return null;
}
@Override
protected FileIEngineImpl createFileIEngine(PluginFactory factory) throws ClassNotFoundException, ZipException, IOException {
return createNotSessionedFileIEngine(factory);
}
};
Engine e = database.getEngine(null);
AccessRules rules = database.getAccessRules(null);
Qualifier q = e.createQualifier();
IDEF0Plugin.installFunctionAttributes(q, e);
return getDataPlugin(q, e, rules);
}
use of com.ramussoft.common.PluginFactory in project ramus by Vitaliy-Yakovchuk.
the class Navigator method createPluginFactory.
private PluginFactory createPluginFactory(List<PluginProvider> list) {
ArrayList<Plugin> plugins = new ArrayList<Plugin>();
for (PluginProvider suit : list) {
plugins.addAll(suit.getPlugins());
}
PluginFactory factory = new PluginFactory(plugins);
return factory;
}
Aggregations