Search in sources :

Example 1 with AbstractPlugin

use of com.ramussoft.common.AbstractPlugin in project ramus by Vitaliy-Yakovchuk.

the class EngineFactory method createPluginFactory.

protected PluginFactory createPluginFactory(List<PluginProvider> list) {
    ArrayList<Plugin> plugins = new ArrayList<Plugin>();
    for (PluginProvider suit : list) {
        plugins.addAll(suit.getPlugins());
    }
    plugins.add(new AbstractPlugin() {

        @Override
        public String getName() {
            return "Log";
        }

        @Override
        public Class getFunctionalInterface() {
            return ILog.class;
        }

        @Override
        public Object createFunctionalInterfaceObject(Engine engine, IEngine iEngine) {
            return log;
        }
    });
    PluginFactory factory = new PluginFactory(plugins);
    return factory;
}
Also used : ArrayList(java.util.ArrayList) IEngine(com.ramussoft.common.IEngine) AbstractPlugin(com.ramussoft.common.AbstractPlugin) PersistentsPluginProvider(com.ramussoft.core.persistent.PersistentsPluginProvider) IDEF0PluginProvider(com.ramussoft.idef0.IDEF0PluginProvider) PluginProvider(com.ramussoft.common.PluginProvider) PluginFactory(com.ramussoft.common.PluginFactory) Engine(com.ramussoft.common.Engine) IEngine(com.ramussoft.common.IEngine) JournaledEngine(com.ramussoft.common.journal.JournaledEngine) CachedEngine(com.ramussoft.common.cached.CachedEngine) Plugin(com.ramussoft.common.Plugin) PersistentsPlugin(com.ramussoft.core.persistent.PersistentsPlugin) AbstractPlugin(com.ramussoft.common.AbstractPlugin)

Aggregations

AbstractPlugin (com.ramussoft.common.AbstractPlugin)1 Engine (com.ramussoft.common.Engine)1 IEngine (com.ramussoft.common.IEngine)1 Plugin (com.ramussoft.common.Plugin)1 PluginFactory (com.ramussoft.common.PluginFactory)1 PluginProvider (com.ramussoft.common.PluginProvider)1 CachedEngine (com.ramussoft.common.cached.CachedEngine)1 JournaledEngine (com.ramussoft.common.journal.JournaledEngine)1 PersistentsPlugin (com.ramussoft.core.persistent.PersistentsPlugin)1 PersistentsPluginProvider (com.ramussoft.core.persistent.PersistentsPluginProvider)1 IDEF0PluginProvider (com.ramussoft.idef0.IDEF0PluginProvider)1 ArrayList (java.util.ArrayList)1