本文整理汇总了Java中org.pentaho.di.core.plugins.PluginRegistry.addPluginType方法的典型用法代码示例。如果您正苦于以下问题:Java PluginRegistry.addPluginType方法的具体用法?Java PluginRegistry.addPluginType怎么用?Java PluginRegistry.addPluginType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.plugins.PluginRegistry
的用法示例。
在下文中一共展示了PluginRegistry.addPluginType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerUIPluginObjectTypes
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
/**
* The core plugin types don't know about UI classes. This method adds those in before initialization.
*
* TODO: create a SpoonLifecycle listener that can notify interested parties of a pre-initialization state so this can
* happen in those listeners.
*/
private static void registerUIPluginObjectTypes() {
RepositoryPluginType repositoryPluginType = RepositoryPluginType.getInstance();
repositoryPluginType.addObjectType( RepositoryRevisionBrowserDialogInterface.class, "version-browser-classname" );
repositoryPluginType.addObjectType( RepositoryDialogInterface.class, "dialog-classname" );
PluginRegistry.addPluginType( SpoonPluginType.getInstance() );
SpoonPluginType.getInstance().getPluginFolders().add( new PluginFolder( "plugins/repositories", false, true ) );
LifecyclePluginType.getInstance().getPluginFolders().add( new PluginFolder( "plugins/spoon", false, true ) );
LifecyclePluginType.getInstance().getPluginFolders().add( new PluginFolder( "plugins/repositories", false, true ) );
PluginRegistry.addPluginType( JobDialogPluginType.getInstance() );
PluginRegistry.addPluginType( TransDialogPluginType.getInstance() );
}
示例2: setUp
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUp() throws KettlePluginException, SQLException {
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.init( true );
loaderData = new VerticaBulkLoaderData();
loaderMeta = spy( new VerticaBulkLoaderMeta() );
TransMeta transMeta = new TransMeta();
transMeta.setName( "loader" );
PluginRegistry pluginRegistry = PluginRegistry.getInstance();
String loaderPid = pluginRegistry.getPluginId( StepPluginType.class, loaderMeta );
StepMeta stepMeta = new StepMeta( loaderPid, "loader", loaderMeta );
Trans trans = new Trans( transMeta );
transMeta.addStep( stepMeta );
trans.setRunning( true );
loaderMeta.setDatabaseMeta( mock( DatabaseMeta.class ) );
loader = spy( new VerticaBulkLoader( stepMeta, loaderData, 1, transMeta, trans ) );
loader.init( loaderMeta, loaderData );
doReturn( mock( VerticaCopyStream.class ) ).when( loader ).createVerticaCopyStream( anyString() );
}
示例3: callExtensionPointTest
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Test
public void callExtensionPointTest() throws Exception {
PluginMockInterface pluginInterface = mock( PluginMockInterface.class );
when( pluginInterface.getName() ).thenReturn( TEST_NAME );
when( pluginInterface.getMainType() ).thenReturn( (Class) ExtensionPointInterface.class );
when( pluginInterface.getIds() ).thenReturn( new String[] {"testID"} );
ExtensionPointInterface extensionPoint = mock( ExtensionPointInterface.class );
when( pluginInterface.loadClass( ExtensionPointInterface.class ) ).thenReturn( extensionPoint );
PluginRegistry.addPluginType( ExtensionPointPluginType.getInstance() );
PluginRegistry.getInstance().registerPlugin( ExtensionPointPluginType.class, pluginInterface );
final LogChannelInterface log = mock( LogChannelInterface.class );
ExtensionPointHandler.callExtensionPoint( log, "noPoint", null );
verify( extensionPoint, never() ).callExtensionPoint( any( LogChannelInterface.class ), any() );
ExtensionPointHandler.callExtensionPoint( log, TEST_NAME, null );
verify( extensionPoint, times( 1 ) ).callExtensionPoint( eq( log ), isNull() );
cleanRegistry( ExtensionPointPluginType.class );
}
示例4: init
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
/**
* 初始化Ketle环境。此方法执行以下 操作:
*
* 创建一个Kettle "home" 的目录,如果它已经不存在 - 读取 在kettle.properties文件 - 初始化记录后端 - 设置
* 控制台日志级别调试 - 如果指定的参数,配置 简单的JNDI - 寄存器的各种原生类型和插件 插件类型 - 读取变量列表 - 初始化生命周期
* 启动监听程序等
*
* @param simpleJndi
* , 真正简单的JNDI配置,否则返回false
* @throws KettleException
* 在初始化过程中发生的任何错误都将抛出 KettleException。
*/
public static void init(boolean simpleJndi) throws KettleException {
if (initialized == null) {
// 创建一个Kettle "home" 的目录
// createKettleHome();
// 初始化 kettle.properties 初始化其他属性等
environmentInit();
// 初始化日志
// CentralLogStore.init();
// // 设置控制台日志级用来调试
// LogWriter.setConsoleAppenderDebug();
// 配置简单的JNDI 仅供我们在单机模式运行
if (simpleJndi) {
JndiUtil.initJNDI();
}
// 注册原生类型和各个所需的插件
PluginRegistry.addPluginType(StepPluginType.getInstance());
PluginRegistry.addPluginType(PartitionerPluginType.getInstance());
PluginRegistry.addPluginType(JobEntryPluginType.getInstance());
PluginRegistry.addPluginType(RepositoryPluginType.getInstance());
PluginRegistry.addPluginType(DatabasePluginType.getInstance());
PluginRegistry.addPluginType(LifecyclePluginType.getInstance());
PluginRegistry.addPluginType(KettleLifecyclePluginType
.getInstance());
PluginRegistry.addPluginType(ImportRulePluginType.getInstance());
PluginRegistry.init();
// 初始化读取的变量列表。
KettleVariablesList.init();
// 初始化生命周期监听器
initLifecycleListeners();
initialized = true;
}
}
示例5: beforeClass
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass public static void beforeClass() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.init();
String
passwordEncoderPluginID =
Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例6: beforeClass
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass public static void beforeClass() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.init();
String passwordEncoderPluginID = Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例7: init
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
/**
* 初始化Ketle环境。此方法执行以下 操作:
*
* 创建一个Kettle "home" 的目录,如果它已经不存在 - 读取 在kettle.properties文件 - 初始化记录后端 - 设置
* 控制台日志级别调试 - 如果指定的参数,配置 简单的JNDI - 寄存器的各种原生类型和插件 插件类型 - 读取变量列表 - 初始化生命周期
* 启动监听程序等
*
* @param simpleJndi
* , 真正简单的JNDI配置,否则返回false
* @throws KettleException
* 在初始化过程中发生的任何错误都将抛出 KettleException。
*/
public static void init(boolean simpleJndi) throws KettleException {
if (initialized == null) {
// 创建一个Kettle "home" 的目录
// createKettleHome();
// 初始化 kettle.properties 初始化其他属性等
environmentInit();
// 初始化日志
CentralLogStore.init();
// 设置控制台日志级用来调试
LogWriter.setConsoleAppenderDebug();
// 配置简单的JNDI 仅供我们在单机模式运行
if (simpleJndi) {
JndiUtil.initJNDI();
}
// 注册原生类型和各个所需的插件
PluginRegistry.addPluginType(StepPluginType.getInstance());
PluginRegistry.addPluginType(PartitionerPluginType.getInstance());
PluginRegistry.addPluginType(JobEntryPluginType.getInstance());
PluginRegistry.addPluginType(RepositoryPluginType.getInstance());
PluginRegistry.addPluginType(DatabasePluginType.getInstance());
PluginRegistry.addPluginType(LifecyclePluginType.getInstance());
PluginRegistry.addPluginType(KettleLifecyclePluginType
.getInstance());
PluginRegistry.addPluginType(ImportRulePluginType.getInstance());
PluginRegistry.init();
// 初始化读取的变量列表。
KettleVariablesList.init();
// 初始化生命周期监听器
initLifecycleListeners();
initialized = true;
}
}
示例8: registerUIPluginObjectTypes
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
/**
* The core plugin types don't know about UI classes. This method adds those
* in before initialization.
*
* TODO: create a SpoonLifecycle listener that can notify interested parties
* of a pre-initialization state so this can happen in those listeners.
*/
private static void registerUIPluginObjectTypes() {
RepositoryPluginType.getInstance().addObjectType(RepositoryRevisionBrowserDialogInterface.class,
"version-browser-classname");
RepositoryPluginType.getInstance().addObjectType(RepositoryDialogInterface.class, "dialog-classname");
PluginRegistry.addPluginType(SpoonPluginType.getInstance());
SpoonPluginType.getInstance().getPluginFolders().add(new PluginFolder("plugins/repositories", false, true));
LifecyclePluginType.getInstance().getPluginFolders().add(new PluginFolder("plugins/spoon", false, true));
LifecyclePluginType.getInstance().getPluginFolders().add(new PluginFolder("plugins/repositories", false, true));
}
示例9: setUpClass
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.init();
String passwordEncoderPluginID = Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例10: beforeClass
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass
public static void beforeClass() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.init();
String passwordEncoderPluginID =
Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例11: before
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass
public static void before() throws KettleException {
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.init( true );
transMeta = getTestTransMeta();
transExecConfig = getTestTransExecConfig( transMeta );
}
示例12: setUpBeforeClass
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws KettleException {
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.init( true );
String passwordEncoderPluginID =
Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例13: setUpClass
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass
public static void setUpClass() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.init();
String passwordEncoderPluginID =
Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例14: before
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before public void before() throws MongoDbException, KettlePluginException {
MockitoAnnotations.initMocks( this );
MongoWrapperUtil.setMongoWrapperClientFactory( clientFactory );
when( clientFactory.createMongoClientWrapper( any( MongoProperties.class ), any( MongoUtilLogger.class ) ) )
.thenReturn( clientWrapper );
when( mockDb.getCollection( any( String.class ) ) ).thenReturn( collection );
when( collection.find() ).thenReturn( cursor );
when( cursor.limit( anyInt() ) ).thenReturn( cursor );
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.init();
}
示例15: setUp
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@BeforeClass
public static void setUp() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.init( true );
String passwordEncoderPluginID =
Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}