当前位置: 首页>>代码示例>>Java>>正文


Java PluginRegistry.addPluginType方法代码示例

本文整理汇总了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() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:Spoon.java

示例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() );
}
 
开发者ID:pentaho,项目名称:pentaho-vertica-bulkloader,代码行数:27,代码来源:VerticaBulkLoaderTest.java

示例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 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:ExtensionPointHandlerTest.java

示例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;
		}
	}
 
开发者ID:jiangzongyao,项目名称:kettle_support_kettle8.0,代码行数:45,代码来源:KettleEnvironment.java

示例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 );
}
 
开发者ID:pentaho-labs,项目名称:pentaho-mqtt-plugin,代码行数:10,代码来源:MQTTSubscriberMetaTest.java

示例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 );
}
 
开发者ID:pentaho-labs,项目名称:pentaho-mqtt-plugin,代码行数:8,代码来源:MQTTPublisherMetaTest.java

示例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;
	}
}
 
开发者ID:839536,项目名称:kettle,代码行数:45,代码来源:KettleEnvironment.java

示例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));

}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:Spoon.java

示例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 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:SalesforceConnectionTest.java

示例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 );
}
 
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:9,代码来源:PropertyAuthenticationProviderParserTest.java

示例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 );
}
 
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:8,代码来源:MRUtilTest.java

示例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 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:SalesforceUpsertMetaTest.java

示例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 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:9,代码来源:SalesforceConnectionIT.java

示例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();
}
 
开发者ID:pentaho,项目名称:pentaho-mongodb-plugin,代码行数:12,代码来源:MongodbInputDiscoverFieldsImplTest.java

示例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 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:9,代码来源:S3CsvInputMetaTest.java


注:本文中的org.pentaho.di.core.plugins.PluginRegistry.addPluginType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。