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]; }
public void helpJobEntry() { final JobEntryCopy jobEntry = (JobEntryCopy) selectionObject; String jobName = jobEntry.getName(); PluginInterface jobEntryPlugin = PluginRegistry.getInstance().findPluginWithName( JobEntryPluginType.class, jobName ); HelpUtils.openHelpDialog( shell, jobEntryPlugin ); }
/** * 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] ); }
PluginRegistry registry = PluginRegistry.getInstance(); Class<? extends PluginTypeInterface> pluginType = JobEntryPluginType.class; PluginInterface plugin = registry.findPluginWithName( pluginType, path[1] ); object = new TreeSelection( path[1], PluginRegistry.getInstance().findPluginWithId( StepPluginType.class, stepId ) ); } else { object = new TreeSelection( path[1], PluginRegistry.getInstance().findPluginWithName( StepPluginType.class, path[1] ) );
String tip = coreStepToolTipMap.get( name ); if ( tip != null ) { PluginInterface plugin = PluginRegistry.getInstance().findPluginWithName( StepPluginType.class, name ); if ( plugin != null ) { Image image = if ( tip != null ) { PluginInterface plugin = PluginRegistry.getInstance().findPluginWithName( JobEntryPluginType.class, name ); if ( plugin != null ) { Image image =
: registry.findPluginWithName( StepPluginType.class, description );
jobPlugin = PluginRegistry.getInstance().findPluginWithName( JobEntryPluginType.class, type_desc ); if ( jobPlugin == null ) {
/** * Find a plugin for a corresponding job entry */ protected PluginInterface getPlugin() { return PluginRegistry.getInstance().findPluginWithName( JobEntryPluginType.class, jobEntry.getName() ); }