Search in sources :

Example 11 with Plugin

use of com.ramussoft.common.Plugin 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)

Example 12 with Plugin

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

the class SimpleAttributePluginSuit method getPlugins.

@Override
public List<Plugin> getPlugins() {
    List<Plugin> res = super.getPlugins();
    res.add(1, new StandardAttributesPlugin());
    res.add(new AutochangePlugin());
    res.add(new EvalPlugin());
    return res;
}
Also used : AutochangePlugin(com.ramussoft.core.attribute.standard.AutochangePlugin) StandardAttributesPlugin(com.ramussoft.core.attribute.standard.StandardAttributesPlugin) EvalPlugin(com.ramussoft.core.attribute.standard.EvalPlugin) EvalPlugin(com.ramussoft.core.attribute.standard.EvalPlugin) FunctionPlugin(com.ramussoft.eval.FunctionPlugin) Plugin(com.ramussoft.common.Plugin) AttributePlugin(com.ramussoft.common.attribute.AttributePlugin) AutochangePlugin(com.ramussoft.core.attribute.standard.AutochangePlugin) StandardAttributesPlugin(com.ramussoft.core.attribute.standard.StandardAttributesPlugin)

Aggregations

Plugin (com.ramussoft.common.Plugin)12 PluginFactory (com.ramussoft.common.PluginFactory)8 PluginProvider (com.ramussoft.common.PluginProvider)7 ArrayList (java.util.ArrayList)7 Engine (com.ramussoft.common.Engine)5 CachedEngine (com.ramussoft.common.cached.CachedEngine)5 StandardAttributesPlugin (com.ramussoft.core.attribute.standard.StandardAttributesPlugin)4 IEngine (com.ramussoft.common.IEngine)3 JournaledEngine (com.ramussoft.common.journal.JournaledEngine)3 GUIPlugin (com.ramussoft.gui.common.GUIPlugin)3 IDEF0PluginProvider (com.ramussoft.idef0.IDEF0PluginProvider)3 AbstractPlugin (com.ramussoft.common.AbstractPlugin)2 AccessRules (com.ramussoft.common.AccessRules)2 AttributePlugin (com.ramussoft.common.attribute.AttributePlugin)2 SimpleAttributePluginSuit (com.ramussoft.core.attribute.simple.SimpleAttributePluginSuit)2 PersistentsPlugin (com.ramussoft.core.persistent.PersistentsPlugin)2 PersistentsPluginProvider (com.ramussoft.core.persistent.PersistentsPluginProvider)2 JDBCTemplate (com.ramussoft.jdbc.JDBCTemplate)2 EngineInvocker (com.ramussoft.net.common.tcp.EngineInvocker)2 InvocationHandler (java.lang.reflect.InvocationHandler)2