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


Java PluginRegistry.init方法代码示例

本文整理汇总了Java中org.pentaho.di.core.plugins.PluginRegistry.init方法的典型用法代码示例。如果您正苦于以下问题:Java PluginRegistry.init方法的具体用法?Java PluginRegistry.init怎么用?Java PluginRegistry.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.plugins.PluginRegistry的用法示例。


在下文中一共展示了PluginRegistry.init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
public static synchronized void init() throws KettleException {
	if (initialized!=null) {
		return;
	}
	
	createKettleHome();
	
	// Read the kettle.properties file before anything else
	//
	EnvUtil.environmentInit();
	
	// Load value meta data plugins
	//
	PluginRegistry.addPluginType(ValueMetaPluginType.getInstance());
	PluginRegistry.init(true);
	
	initialized=new Boolean(true);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:19,代码来源:KettleClientEnvironment.java

示例2: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "gPGLocation", "passphrase", "passphraseFieldName", "passphraseFieldName", "streamField", "resultFieldName" );

  Map<String, String> getterMap = new HashMap<String, String>();
  Map<String, String> setterMap = new HashMap<String, String>();

  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, getterMap, setterMap, attrValidatorMap, typeValidatorMap );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:PGPDecryptStreamMetaTest.java

示例3: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "typeField", "normaliserFields" );

  Map<String, String> getterMap = new HashMap<String, String>();
  Map<String, String> setterMap = new HashMap<String, String>();

  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  attrValidatorMap.put( "normaliserFields",
      new ArrayLoadSaveValidator<NormaliserMeta.NormaliserField>( new NormaliserFieldLoadSaveValidator(), 5 ) );

  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, new ArrayList<String>(), new ArrayList<String>(),
          getterMap, setterMap, attrValidatorMap, typeValidatorMap, this );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:NormaliserMetaTest.java

示例4: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "transName", "fileName", "directoryPath", "allowingMultipleInputs", "allowingMultipleOutputs",
          "specificationMethod", "transObjectId", "inputMappings", "outputMappings", "mappingParameters" );

  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  attrValidatorMap.put( "specificationMethod", new ObjectLocationSpecificationMethodLoadSaveValidator() );
  attrValidatorMap.put( "transObjectId", new ObjectIdLoadSaveValidator() );
  attrValidatorMap.put( "inputMappings", new ListLoadSaveValidator<MappingIODefinition>( new MappingIODefinitionLoadSaveValidator(), 5 ) );
  attrValidatorMap.put( "outputMappings", new ListLoadSaveValidator<MappingIODefinition>( new MappingIODefinitionLoadSaveValidator(), 5 ) );
  attrValidatorMap.put( "mappingParameters", new MappingParametersLoadSaveValidator() );

  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, new HashMap<String, String>(), new HashMap<String, String>(),
          attrValidatorMap, typeValidatorMap );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:MappingMetaTest.java

示例5: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "condition" );

  Map<String, String> getterMap = new HashMap<String, String>();
  Map<String, String> setterMap = new HashMap<String, String>();

  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, getterMap, setterMap, attrValidatorMap, typeValidatorMap );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:JavaFilterMetaTest.java

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "databaseMeta", "sql", "executedEachInputRow", "updateField", "insertField", "deleteField", "readField",
          "singleStatement", "replaceVariables", "quoteString", "params", "arguments" );

  Map<String, String> getterMap = new HashMap<String, String>();
  Map<String, String> setterMap = new HashMap<String, String>() {
    {
      put( "replaceVariables", "setVariableReplacementActive" );
    }
  };
  FieldLoadSaveValidator<String[]> stringArrayLoadSaveValidator =
      new ArrayLoadSaveValidator<String>( new StringLoadSaveValidator(), 5 );


  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  attrValidatorMap.put( "arguments", stringArrayLoadSaveValidator );

  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, new ArrayList<String>(), new ArrayList<String>(),
          getterMap, setterMap, attrValidatorMap, typeValidatorMap, this );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:28,代码来源:ExecSQLMetaTest.java

示例11: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "conditionReceivedDate", "valueimaplist", "serverName", "userName", "password", "useSSL", "port",
          "firstMails", "retrievemails", "delete", "protocol", "firstIMAPMails", "IMAPFolder", "senderSearchTerm",
          "notTermSenderSearch", "recipientSearch", "subjectSearch", "receivedDate1", "receivedDate2",
          "notTermSubjectSearch", "notTermRecipientSearch", "notTermReceivedDateSearch", "includeSubFolders", "useProxy",
          "proxyUsername", "folderField", "dynamicFolder", "rowLimit", "useBatch", "start", "end", "batchSize",
          "stopOnError", "inputFields" );

  Map<String, String> getterMap = new HashMap<String, String>();
  Map<String, String> setterMap = new HashMap<String, String>();

  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  attrValidatorMap.put( "inputFields",
      new ArrayLoadSaveValidator<MailInputField>( new MailInputFieldLoadSaveValidator(), 5 ) );
  attrValidatorMap.put( "batchSize", new IntLoadSaveValidator( 1000 ) );
  attrValidatorMap.put( "conditionReceivedDate", new IntLoadSaveValidator( MailConnectionMeta.conditionDateCode.length ) );
  attrValidatorMap.put( "valueimaplist", new IntLoadSaveValidator( MailConnectionMeta.valueIMAPListCode.length ) );
  attrValidatorMap.put( "port", new StringIntLoadSaveValidator( 65534 ) );

  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, new ArrayList<String>(), new ArrayList<String>(),
          getterMap, setterMap, attrValidatorMap, typeValidatorMap, this );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:30,代码来源:MailInputMetaTest.java

示例12: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "BufferSize", "Delimiter", "Enclosure", "Encoding", "Filename", "FilenameField", "InputFields", "RowNumField",
          "AddResultFile", "HeaderPresent", "IncludingFilename", "LazyConversionActive", "NewlinePossibleInFields", "RunningInParallel" );

  Map<String, String> getterMap = new HashMap<String, String>() {
    {
      put( "hasHeader", "hasHeader" );
      put( "includeFilename", "includeFilename" );
      put( "includeRowNumber", "includeRowNumber" );
    }
  };
  Map<String, String> setterMap = new HashMap<String, String>() {
    {
      put( "includeFilename", "includeFilename" );
      put( "includeRowNumber", "includeRowNumber" );
    }
  };
  FieldLoadSaveValidator<String[]> stringArrayLoadSaveValidator =
      new ArrayLoadSaveValidator<String>( new StringLoadSaveValidator(), 5 );


  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  attrValidatorMap.put( "InputFields",
      new ArrayLoadSaveValidator<TextFileInputField>( new TextFileInputFieldValidator(), 5 ) );

  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, new ArrayList<String>(), new ArrayList<String>(),
          getterMap, setterMap, attrValidatorMap, typeValidatorMap, this );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:36,代码来源:CsvInputMetaTest.java

示例13: init

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
private void init( FieldLoadSaveValidator<String[]> sourceStringArrayLoadSaveValidator,
  FieldLoadSaveValidator<String[]> targetStringArrayLoadSaveValidator ) throws KettleException {

  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
    Arrays.asList( "fieldToUse", "targetField", "nonMatchDefault", "sourceValue", "targetValue" );

  Map<String, String> getterMap = new HashMap<String, String>() {
    {
      put( "fieldToUse", "getFieldToUse" );
      put( "targetField", "getTargetField" );
      put( "nonMatchDefault", "getNonMatchDefault" );
      put( "sourceValue", "getSourceValue" );
      put( "targetValue", "getTargetValue" );
    }
  };
  Map<String, String> setterMap = new HashMap<String, String>() {
    {
      put( "fieldToUse", "setFieldToUse" );
      put( "targetField", "setTargetField" );
      put( "nonMatchDefault", "setNonMatchDefault" );
      put( "sourceValue", "setSourceValue" );
      put( "targetValue", "setTargetValue" );
    }
  };

  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  attrValidatorMap.put( "sourceValue", sourceStringArrayLoadSaveValidator );
  attrValidatorMap.put( "targetValue", targetStringArrayLoadSaveValidator );

  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
    new LoadSaveTester( testMetaClass, attributes, new ArrayList<String>(), new ArrayList<String>(),
      getterMap, setterMap, attrValidatorMap, typeValidatorMap, this );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:38,代码来源:ValueMapperMetaTest.java

示例14: setUpLoadSave

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
@Before
public void setUpLoadSave() throws Exception {
  KettleEnvironment.init();
  PluginRegistry.init( true );
  List<String> attributes =
      Arrays.asList( "transName", "fileName", "directoryPath", "batchSize", "batchTime", "injectStep", "retrieveStep",
          "passingAllParameters", "specificationMethod", "transObjectId", "parameters", "parameterValues" );

  Map<String, String> getterMap = new HashMap<String, String>();
  Map<String, String> setterMap = new HashMap<String, String>();

  FieldLoadSaveValidator<String[]> stringArrayLoadSaveValidator =
      new ArrayLoadSaveValidator<String>( new StringLoadSaveValidator(), 5 );


  Map<String, FieldLoadSaveValidator<?>> attrValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();
  attrValidatorMap.put( "parameters", stringArrayLoadSaveValidator );
  attrValidatorMap.put( "parameterValues", stringArrayLoadSaveValidator );
  attrValidatorMap.put( "specificationMethod", new ObjectLocationSpecificationMethodLoadSaveValidator() );
  attrValidatorMap.put( "transObjectId", new ObjectIdLoadSaveValidator() );

  Map<String, FieldLoadSaveValidator<?>> typeValidatorMap = new HashMap<String, FieldLoadSaveValidator<?>>();

  loadSaveTester =
      new LoadSaveTester( testMetaClass, attributes, new ArrayList<String>(), new ArrayList<String>(),
          getterMap, setterMap, attrValidatorMap, typeValidatorMap, this );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:28,代码来源:SingleThreaderMetaTest.java

示例15: 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,代码来源:SalesforceInsertMetaTest.java


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