/** * Retrieve a list of plugins per category. * * @param pluginType The type of plugins to search * @param pluginCategory The category to look in * @return An unmodifiable list of plugins that belong to the specified type and category. */ public <T extends PluginTypeInterface> List<PluginInterface> getPluginsByCategory( Class<T> pluginType, String pluginCategory ) { List<PluginInterface> plugins = getPlugins( pluginType ).stream() .filter( plugin -> plugin.getCategory() != null && plugin.getCategory().equals( pluginCategory ) ) .collect( Collectors.toList() ); return Collections.unmodifiableList( plugins ); }
if ( !Utils.isEmpty( plugin.getCategory() ) ) { .add( plugin.getCategory() );
public static final Button setShellImage( Shell shell, JobEntryInterface jobEntryInterface ) { Button helpButton = null; try { final PluginInterface plugin = getPlugin( jobEntryInterface ); if ( plugin.getCategory().equals( BaseMessages.getString( PKGBASE, "JobCategory.Category.Deprecated" ) ) ) { addDeprecation( shell ); } helpButton = HelpUtils.createHelpButton( shell, HelpUtils.getHelpDialogTitle( plugin ), plugin ); shell.setImage( getImage( shell, plugin ) ); } catch ( Throwable e ) { // Ignore unexpected errors, not worth it } return helpButton; }
/** * @param pluginType the type of plugin to get information for * @return a row buffer containing plugin information for the given plugin type * @throws KettlePluginException */ public RowBuffer getPluginInformation( Class<? extends PluginTypeInterface> pluginType ) throws KettlePluginException { RowBuffer rowBuffer = new RowBuffer( getPluginInformationRowMeta() ); for ( PluginInterface plugin : getPlugins( pluginType ) ) { Object[] row = new Object[getPluginInformationRowMeta().size()]; int rowIndex = 0; row[rowIndex++] = getPluginType( plugin.getPluginType() ).getName(); row[rowIndex++] = plugin.getIds()[0]; row[rowIndex++] = plugin.getName(); row[rowIndex++] = Const.NVL( plugin.getDescription(), "" ); row[rowIndex++] = Utils.isEmpty( plugin.getLibraries() ) ? "" : plugin.getLibraries().toString(); row[rowIndex++] = Const.NVL( plugin.getImageFile(), "" ); row[rowIndex++] = plugin.getClassMap().values().toString(); row[rowIndex] = Const.NVL( plugin.getCategory(), "" ); rowBuffer.getBuffer().add( row ); } return rowBuffer; }
.filter( baseStep -> baseStep.getCategory().equalsIgnoreCase( baseCategory ) ) .sorted( Comparator.comparing( PluginInterface::getName ) ) .collect( Collectors.toList() ); if ( baseJobEntries.get( j ).getCategory().equalsIgnoreCase( baseCategory ) ) { final Image jobEntryImage = GUIResource.getInstance().getImagesJobentriesSmall().get( baseJobEntries.get( j ).getIds()[0] );