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


Java PluginRegistry.findPluginWithName方法代码示例

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


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

示例1: getMethod

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
public static final String getMethod(String name)
{
	if (Const.isEmpty(name)) return methodCodes[PARTITIONING_METHOD_NONE];
	
    for (int i=0;i<methodDescriptions.length;i++)
    {
        if (methodDescriptions[i].equalsIgnoreCase(name)){
        	return methodCodes[i];
        }
    }
    
    for (int i=0;i<methodCodes.length;i++)
    {
        if (methodCodes[i].equalsIgnoreCase(name)) return methodCodes[i];
    }
    
    PluginRegistry registry = PluginRegistry.getInstance();
    PluginInterface plugin = registry.findPluginWithName(PartitionerPluginType.class, name);
    if( plugin != null ) {
    	return name;
    }
    plugin = registry.findPluginWithId(PartitionerPluginType.class, name);
    if( plugin != null ) {
    	return name;
    }

    
    return methodCodes[PARTITIONING_METHOD_NONE];
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:30,代码来源:StepPartitioningMeta.java

示例2: findDatabaseInterface

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
/**
 * Search for the right type of DatabaseInterface object and return it.
 * 
 * @param databaseType the type of DatabaseInterface to look for (id or description)
 * @return The requested DatabaseInterface
 * 
 * @throws KettleDatabaseException when the type could not be found or referenced.
 */
private static final DatabaseInterface findDatabaseInterface(String databaseTypeDesc) throws KettleDatabaseException
{
	PluginRegistry registry = PluginRegistry.getInstance();
	PluginInterface plugin = registry.getPlugin(DatabasePluginType.class, databaseTypeDesc);
	if (plugin==null) {
		plugin = registry.findPluginWithName(DatabasePluginType.class, databaseTypeDesc); 
	}
	
	if (plugin==null) {
		throw new KettleDatabaseException("database type with plugin id ["+databaseTypeDesc+"] couldn't be found!");
	}
	
	return getDatabaseInterfacesMap().get(plugin.getIds()[0]);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:DatabaseMeta.java

示例3: getMethod

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
public static final String getMethod( String name ) {
  if ( Utils.isEmpty( name ) ) {
    return methodCodes[PARTITIONING_METHOD_NONE];
  }

  for ( int i = 0; i < methodDescriptions.length; i++ ) {
    if ( methodDescriptions[i].equalsIgnoreCase( name ) ) {
      return methodCodes[i];
    }
  }

  for ( int i = 0; i < methodCodes.length; i++ ) {
    if ( methodCodes[i].equalsIgnoreCase( name ) ) {
      return methodCodes[i];
    }
  }

  PluginRegistry registry = PluginRegistry.getInstance();
  PluginInterface plugin = registry.findPluginWithName( PartitionerPluginType.class, name );
  if ( plugin != null ) {
    return name;
  }
  plugin = registry.findPluginWithId( PartitionerPluginType.class, name );
  if ( plugin != null ) {
    return name;
  }

  return methodCodes[PARTITIONING_METHOD_NONE];
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:30,代码来源:StepPartitioningMeta.java

示例4: findDatabaseInterface

import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
/**
 * Search for the right type of DatabaseInterface object and return it.
 *
 * @param databaseTypeDesc
 *          the type of DatabaseInterface to look for (id or description)
 * @return The requested DatabaseInterface
 *
 * @throws KettleDatabaseException
 *           when the type could not be found or referenced.
 */
private static final DatabaseInterface findDatabaseInterface( String databaseTypeDesc ) throws KettleDatabaseException {
  PluginRegistry registry = PluginRegistry.getInstance();
  PluginInterface plugin = registry.getPlugin( DatabasePluginType.class, databaseTypeDesc );
  if ( plugin == null ) {
    plugin = registry.findPluginWithName( DatabasePluginType.class, databaseTypeDesc );
  }

  if ( plugin == null ) {
    throw new KettleDatabaseException( "database type with plugin id ["
      + databaseTypeDesc + "] couldn't be found!" );
  }

  return getDatabaseInterfacesMap().get( plugin.getIds()[0] );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:DatabaseMeta.java


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