org.pentaho.di.core.extension.ExtensionPoint Java Examples
The following examples show how to use
org.pentaho.di.core.extension.ExtensionPoint.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TransMetaPipelineConverter.java From kettle-beam with Apache License 2.0 | 5 votes |
public void addClassesFromPluginsToStage( String pluginsToStage ) throws KettleException { // Find the plugins in the jar files in the plugin folders to stage... // if ( StringUtils.isNotEmpty( pluginsToStage ) ) { String[] pluginFolders = pluginsToStage.split( "," ); for ( String pluginFolder : pluginFolders ) { List<String> stepClasses = findAnnotatedClasses( pluginFolder, Step.class.getName() ); stepPluginClasses.addAll( stepClasses ); List<String> xpClasses = findAnnotatedClasses( pluginFolder, ExtensionPoint.class.getName() ); xpPluginClasses.addAll( xpClasses ); } } }
Example #2
Source File: BeamJobConfigDialog.java From kettle-beam with Apache License 2.0 | 4 votes |
private void buildFatJar( Event event ) { try { VariableSpace space = Variables.getADefaultVariableSpace(); BeamJobConfig jobConfig = new BeamJobConfig(); getInfo( jobConfig ); FileDialog dialog = new FileDialog( shell, SWT.SAVE ); dialog.setText( "Select the location of the Kettle+Beam+Plugins fat jar" ); dialog.setFilterNames( new String[] { "Jar files (*.jar)", "All Files (*.*)" } ); dialog.setFilterExtensions( new String[] { "*.jar", "*.*" } ); // Windows if ( StringUtils.isNotEmpty( jobConfig.getFatJar() ) ) { dialog.setFileName( space.environmentSubstitute( jobConfig.getFatJar() ) ); } String filename = dialog.open(); if ( StringUtils.isEmpty( filename ) ) { return; } List<String> files = BeamConst.findLibraryFilesToStage( null, jobConfig.getPluginsToStage(), true, true ); files.removeIf( s -> s.contains( "commons-logging" ) || s.startsWith( "log4j" ) || s.contains( "xml-apis" ) ); // Find the plugin classes for the specified plugins... // String stepPluginClasses = findPluginClasses( Step.class.getName() ); if (StringUtils.isNotEmpty(jobConfig.getStepPluginClasses())) { if (StringUtils.isEmpty( stepPluginClasses )) { stepPluginClasses=""; } else { stepPluginClasses+=","; } stepPluginClasses+=jobConfig.getStepPluginClasses(); } String xpPluginClasses = findPluginClasses( ExtensionPoint.class.getName() ); if (StringUtils.isNotEmpty(jobConfig.getXpPluginClasses())) { if (StringUtils.isEmpty( xpPluginClasses )) { xpPluginClasses=""; } else { xpPluginClasses+=","; } xpPluginClasses+=jobConfig.getStepPluginClasses(); } FatJarBuilder fatJarBuilder = new FatJarBuilder( filename, files ); fatJarBuilder.setExtraStepPluginClasses( stepPluginClasses ); fatJarBuilder.setExtraXpPluginClasses( xpPluginClasses ); Cursor waitCursor = new Cursor( shell.getDisplay(), SWT.CURSOR_WAIT ); Cursor regularCursor = shell.getCursor(); try { shell.setCursor( waitCursor ); fatJarBuilder.buildTargetJar(); } finally { shell.setCursor( regularCursor ); waitCursor.dispose(); } // All went well, insert the filename... // wFatJar.setText( filename ); } catch ( Exception e ) { new ErrorDialog( shell, "Error", "Error building fat jar: " + e.getMessage(), e ); } }
Example #3
Source File: BeamJobConfigDialog.java From kettle-beam with Apache License 2.0 | 4 votes |
private void findXpClasses( Event event ) { String xpPluginClasses = findPluginClasses( ExtensionPoint.class.getName() ); if ( xpPluginClasses != null ) { wXpPluginClasses.setText( xpPluginClasses ); } }