Search in sources :

Example 1 with Plugin

use of org.pentaho.di.core.plugins.Plugin in project pentaho-kettle by pentaho.

the class DenormaliserMetaInjectionIT method initKettle.

@BeforeClass
public static void initKettle() throws Exception {
    KettleEnvironment.init(false);
    Map<Class<?>, String> classMap = new HashMap<>();
    classMap.put(StepMetaInterface.class, "org.pentaho.di.trans.steps.metainject.MetaInjectMeta");
    List<String> libraries = new ArrayList<>();
    PluginInterface plugin = new Plugin(new String[] { "MetaInject" }, StepPluginType.class, StepMetaInterface.class, "Flow", "MetaInjectMeta", null, null, false, false, classMap, libraries, null, null);
    PluginRegistry.getInstance().registerPlugin(StepPluginType.class, plugin);
}
Also used : HashMap(java.util.HashMap) PluginInterface(org.pentaho.di.core.plugins.PluginInterface) ArrayList(java.util.ArrayList) BeforeClass(org.junit.BeforeClass) Plugin(org.pentaho.di.core.plugins.Plugin) BeforeClass(org.junit.BeforeClass)

Example 2 with Plugin

use of org.pentaho.di.core.plugins.Plugin in project pentaho-kettle by pentaho.

the class MetaInjectTemplateInFSAndRepoSpecMethodIT method initKettle.

@BeforeClass
public static void initKettle() throws Exception {
    KettleEnvironment.init(false);
    Map<Class<?>, String> classMap = new HashMap<>();
    classMap.put(StepMetaInterface.class, "org.pentaho.di.trans.steps.metainject.MetaInjectMeta");
    List<String> libraries = new ArrayList<>();
    PluginInterface plugin = new Plugin(new String[] { "MetaInject" }, StepPluginType.class, StepMetaInterface.class, "Flow", "MetaInjectMeta", null, null, false, false, classMap, libraries, null, null);
    PluginRegistry.getInstance().registerPlugin(StepPluginType.class, plugin);
}
Also used : HashMap(java.util.HashMap) PluginInterface(org.pentaho.di.core.plugins.PluginInterface) ArrayList(java.util.ArrayList) BeforeClass(org.junit.BeforeClass) Plugin(org.pentaho.di.core.plugins.Plugin) BeforeClass(org.junit.BeforeClass)

Example 3 with Plugin

use of org.pentaho.di.core.plugins.Plugin in project pentaho-kettle by pentaho.

the class NormaliserMetaInjectionIT method initKettle.

@BeforeClass
public static void initKettle() throws Exception {
    KettleEnvironment.init(false);
    Map<Class<?>, String> classMap = new HashMap<>();
    classMap.put(StepMetaInterface.class, "org.pentaho.di.trans.steps.metainject.MetaInjectMeta");
    List<String> libraries = new ArrayList<>();
    PluginInterface plugin = new Plugin(new String[] { "MetaInject" }, StepPluginType.class, StepMetaInterface.class, "Flow", "MetaInjectMeta", null, null, false, false, classMap, libraries, null, null);
    PluginRegistry.getInstance().registerPlugin(StepPluginType.class, plugin);
}
Also used : HashMap(java.util.HashMap) PluginInterface(org.pentaho.di.core.plugins.PluginInterface) ArrayList(java.util.ArrayList) BeforeClass(org.junit.BeforeClass) Plugin(org.pentaho.di.core.plugins.Plugin) BeforeClass(org.junit.BeforeClass)

Example 4 with Plugin

use of org.pentaho.di.core.plugins.Plugin in project pentaho-kettle by pentaho.

the class MappingInputFieldsTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    KettleEnvironment.init();
    // PluginRegistry.addPluginType(ValueMetaPluginType.getInstance());
    PluginRegistry.getInstance().registerPluginType(ValueMetaPluginType.class);
    Map<Class<?>, String> classes = new HashMap<Class<?>, String>();
    classes.put(ValueMetaInterface.class, "org.pentaho.di.core.row.value.ValueMetaString");
    p1 = new Plugin(new String[] { "2" }, ValueMetaPluginType.class, ValueMetaInterface.class, "", "", "", "", false, true, classes, null, null, null);
    classes = new HashMap<Class<?>, String>();
    classes.put(ValueMetaInterface.class, "org.pentaho.di.core.row.value.ValueMetaInteger");
    p2 = new Plugin(new String[] { "5" }, ValueMetaPluginType.class, ValueMetaInterface.class, "", "", "", "", false, true, classes, null, null, null);
    PluginRegistry.getInstance().registerPlugin(ValueMetaPluginType.class, p1);
    PluginRegistry.getInstance().registerPlugin(ValueMetaPluginType.class, p2);
}
Also used : HashMap(java.util.HashMap) ValueMetaPluginType(org.pentaho.di.core.row.value.ValueMetaPluginType) BeforeClass(org.junit.BeforeClass) AfterClass(org.junit.AfterClass) ValueMetaString(org.pentaho.di.core.row.value.ValueMetaString) Plugin(org.pentaho.di.core.plugins.Plugin) ValueMetaInterface(org.pentaho.di.core.row.ValueMetaInterface) BeforeClass(org.junit.BeforeClass)

Example 5 with Plugin

use of org.pentaho.di.core.plugins.Plugin in project pentaho-metaverse by pentaho.

the class IntegrationTestUtil method registerKettlePlugins.

private static void registerKettlePlugins() throws KettlePluginException {
    Map<Class<?>, String> mongoInputClassMap = new HashMap<Class<?>, String>(1);
    mongoInputClassMap.put(StepMetaInterface.class, MongoDbInputMeta.class.getName());
    List<String> empty = Collections.emptyList();
    Plugin mongodbInputPlugin = new Plugin(new String[] { "MongoDbInput" }, StepPluginType.class, StepMetaInterface.class, "Big Data", "MongoDB Input", null, null, false, false, mongoInputClassMap, empty, null, null);
    PluginRegistry.getInstance().registerPlugin(StepPluginType.class, mongodbInputPlugin);
}
Also used : HashMap(java.util.HashMap) MongoDbInputMeta(org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta) Plugin(org.pentaho.di.core.plugins.Plugin)

Aggregations

HashMap (java.util.HashMap)5 Plugin (org.pentaho.di.core.plugins.Plugin)5 BeforeClass (org.junit.BeforeClass)4 ArrayList (java.util.ArrayList)3 PluginInterface (org.pentaho.di.core.plugins.PluginInterface)3 AfterClass (org.junit.AfterClass)1 ValueMetaInterface (org.pentaho.di.core.row.ValueMetaInterface)1 ValueMetaPluginType (org.pentaho.di.core.row.value.ValueMetaPluginType)1 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)1 MongoDbInputMeta (org.pentaho.di.trans.steps.mongodbinput.MongoDbInputMeta)1