@LifecyclePlugin( id = "JsonInputAnalyzerPlugin", name = "JsonInputAnalyzerPlugin" ) public class JsonInputAnalyzerPluginLifecycleListener implements LifecycleListener { @Override public void onStart( final LifeEventHandler lifeEventHandler ) throws LifecycleException { // instantiate a new analyzer final JsonInputAnalyzer analyzer = new JsonInputAnalyzer(); // construct the external resource consumer for the files that it reads from final IStepExternalResourceConsumer consumer = new JsonInputExternalResourceConsumer(); analyzer.setExternalResourceConsumer( consumer ); // register the analyzer with PentahoSystem PentahoSystem.registerObject( analyzer ); // register the consumer with PentahoSystem PentahoSystem.registerObject( consumer ); } @Override public void onExit( LifeEventHandler lifeEventHandler ) throws LifecycleException { } }
@LifecyclePlugin( id = "JsonOutputAnalyzerPlugin", name = "JsonOutputAnalyzerPlugin" ) public class JsonOutputAnalyzerPluginLifecycleListener implements LifecycleListener { @Override public void onStart( final LifeEventHandler lifeEventHandler ) throws LifecycleException { // instantiate a new analyzer final ExternalResourceStepAnalyzer analyzer = new JsonOutputAnalyzer(); // construct the external resource consumer for the files that it reads from final IStepExternalResourceConsumer consumer = new JsonOutputExternalResourceConsumer(); analyzer.setExternalResourceConsumer( consumer ); // register the analyzer with PentahoSystem PentahoSystem.registerObject( analyzer ); // register the consumer with PentahoSystem PentahoSystem.registerObject( consumer ); } @Override public void onExit( LifeEventHandler lifeEventHandler ) throws LifecycleException { } }
/** * Created by bmorrise on 7/6/18. */ @LifecyclePlugin( id = "RunConfigurationLifecycleListener" ) public class RunConfigurationLifecycleListener implements LifecycleListener { private RunConfigurationDelegate runConfigurationDelegate; private Supplier<Spoon> spoonSupplier = Spoon::getInstance; public RunConfigurationLifecycleListener( RunConfigurationDelegate runConfigurationDelegate ) { this.runConfigurationDelegate = runConfigurationDelegate; } @Override public void onStart( LifeEventHandler handler ) throws LifecycleException { Spoon spoon = spoonSupplier.get(); if ( spoon != null ) { spoon.getTreeManager().addTreeProvider( Spoon.STRING_TRANSFORMATIONS, new RunConfigurationFolderProvider( runConfigurationDelegate ) ); spoon.getTreeManager().addTreeProvider( Spoon.STRING_JOBS, new RunConfigurationFolderProvider( runConfigurationDelegate ) ); } } @Override public void onExit( LifeEventHandler handler ) throws LifecycleException { } }
/** * Created by rfellows on 12/31/15. */ @LifecyclePlugin( id = "KettleXmlPlugin", name = "KettleXmlPlugin" ) public class KettleXmlPluginLifecycleListener implements LifecycleListener { @Override public void onStart( LifeEventHandler handler ) throws LifecycleException { GetXMLDataStepAnalyzer getXMLDataStepAnalyzer = new GetXMLDataStepAnalyzer(); GetXMLDataExternalResourceConsumer getXMLDataExternalResourceConsumer = new GetXMLDataExternalResourceConsumer(); getXMLDataStepAnalyzer.setExternalResourceConsumer( getXMLDataExternalResourceConsumer ); XMLOutputStepAnalyzer xmlOutputStepAnalyzer = new XMLOutputStepAnalyzer(); XMLOutputExternalResourceConsumer xmlOutputExternalResourceConsumer = new XMLOutputExternalResourceConsumer(); xmlOutputStepAnalyzer.setExternalResourceConsumer( xmlOutputExternalResourceConsumer ); PentahoSystem.registerObject( getXMLDataStepAnalyzer ); PentahoSystem.registerObject( getXMLDataExternalResourceConsumer ); PentahoSystem.registerObject( xmlOutputStepAnalyzer ); PentahoSystem.registerObject( xmlOutputExternalResourceConsumer ); } @Override public void onExit( LifeEventHandler handler ) throws LifecycleException { // no-op } }
@LifecyclePlugin( id = "GoogleDriveKettleLifecycleListener", name = "GoogleDriveKettleLifecycleListener" ) public class GoogleDriveKettleLifecycleListener implements LifecycleListener { private ResourceBundle resourceBundle = PropertyResourceBundle.getBundle( "plugin" ); public void onStart( LifeEventHandler handler ) throws LifecycleException { if ( new File( GoogleDriveFileObject.resolveCredentialsPath() + "/" + resourceBundle.getString( "client.secrets" ) ) .exists() ) { /* * Registers the UI for the VFS Browser * */ final Spoon spoon = Spoon.getInstance(); spoon.getDisplay().asyncExec( new Runnable() { public void run() { VfsFileChooserDialog dialog = spoon.getVfsFileChooserDialog( null, null ); GoogleDriveFileChooserDialog hadoopVfsFileChooserDialog = new GoogleDriveFileChooserDialog( GoogleDriveFileProvider.SCHEME, GoogleDriveFileProvider.DISPLAY_NAME, dialog, SWT.NONE ); dialog.addVFSUIPanel( hadoopVfsFileChooserDialog ); } } ); } } public void onExit( LifeEventHandler handler ) throws LifecycleException { } }
@LifecyclePlugin( id = "VersionChecker", name = "Version checker" ) @PluginClassTypeMapping( classTypes = { GUIOption.class }, implementationClass = { VersionCheckerListener.class } ) public class VersionCheckerListener implements LifecycleListener, GUIOption<Boolean> {
@LifecyclePlugin( id = "AmazonSpoonPlugin", name = "Amazon Spoon Plugin EE" ) public class AmazonSpoonPlugin implements LifecycleListener, GUIOption<Object> { private final int s3Priority = 120; public void onStart( LifeEventHandler arg0 ) throws LifecycleException { VfsFileChooserDialog dialog = Spoon.getInstance().getVfsFileChooserDialog( null, null ); Spoon.getInstance().getVfsFileChooserDialog( null, null ).addVFSUIPanel( s3Priority, new S3NVfsFileChooserDialog( dialog, null, null ) ); } public void onExit( LifeEventHandler arg0 ) throws LifecycleException { } public String getLabelText() { return null; } public Object getLastValue() { return null; } public DisplayType getType() { return null; } public void setValue( Object value ) { } }
@LifecyclePlugin( id = "HadoopSpoonPlugin", name = "Hadoop Spoon Plugin" ) public class HadoopSpoonPlugin implements LifecycleListener, GUIOption<Object> { public static final String PLUGIN_ID = "HadoopSpoonPlugin";
@LifecyclePlugin( id = "HdfsLifecycleListener", name = "HdfsLifecycleListener" ) public class HdfsLifecycleListener implements LifecycleListener {