本文整理汇总了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];
}
示例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]);
}
示例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];
}
示例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] );
}