org.pentaho.di.core.Props Java Examples

The following examples show how to use org.pentaho.di.core.Props. 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: Translator.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
public static void main( String[] args ) {
  Display display = new Display();
  LogChannelInterface log = new LogChannel( APP_NAME );
  PropsUI.init( display, Props.TYPE_PROPERTIES_SPOON );

  Translator translator = new Translator( display );
  translator.open();

  try {
    while ( !display.isDisposed() ) {
      if ( !display.readAndDispatch() ) {
        display.sleep();
      }
    }
  } catch ( Throwable e ) {
    log.logError( "An unexpected error occurred : " + e.getMessage() );
    log.logError( Const.getStackTracker( e ) );
  }
}
 
Example #2
Source File: JobLogDelegate.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void addToolBar() {

    try {
      XulLoader loader = new KettleXulLoader();
      loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
      ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
      XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_LOG_TOOLBAR, bundle );
      xulDomContainer.addEventHandler( this );
      toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );

      ToolBar swtToolbar = (ToolBar) toolbar.getManagedObject();
      spoon.props.setLook( swtToolbar, Props.WIDGET_STYLE_TOOLBAR );
      swtToolbar.layout( true, true );
    } catch ( Throwable t ) {
      log.logError( Const.getStackTracker( t ) );
      new ErrorDialog( jobLogComposite.getShell(),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR ),
        new Exception( t ) );
    }
  }
 
Example #3
Source File: JobHistoryDelegate.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void addLogTableTabs() {
  // Create a nested tab folder in the tab item, on the history composite...
  //
  tabFolder = new CTabFolder( jobHistoryComposite, SWT.MULTI );
  spoon.props.setLook( tabFolder, Props.WIDGET_STYLE_TAB );

  FormData fdTabFolder = new FormData();
  fdTabFolder.left = new FormAttachment( 0, 0 ); // First one in the left top corner
  fdTabFolder.top = new FormAttachment( (Control) toolbar.getManagedObject(), 0 );
  fdTabFolder.right = new FormAttachment( 100, 0 );
  fdTabFolder.bottom = new FormAttachment( 100, 0 );
  tabFolder.setLayoutData( fdTabFolder );

  models = new JobHistoryLogTab[jobMeta.getLogTables().size()];
  for ( int i = 0; i < models.length; i++ ) {
    models[i] = new JobHistoryLogTab( tabFolder, jobMeta.getLogTables().get( i ) );
  }
}
 
Example #4
Source File: JobHistoryDelegate.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void addToolBar() {
  try {
    XulLoader loader = new KettleXulLoader();
    loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
    ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
    XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
    xulDomContainer.addEventHandler( this );
    toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );

    refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "refresh-history" );
    fetchNextBatchButton =
      (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-next-batch-history" );
    fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-all-history" );

    ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
    spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
    swtToolBar.layout( true, true );
  } catch ( Throwable t ) {
    log.logError( Const.getStackTracker( t ) );
    new ErrorDialog( jobHistoryComposite.getShell(),
      BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
      BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
      new Exception( t ) );
  }
}
 
Example #5
Source File: TransGridDelegate.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void addToolBar() {

    try {
      XulLoader loader = new KettleXulLoader();
      loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
      ResourceBundle bundle = GlobalMessages.getBundle( "org/pentaho/di/ui/spoon/messages/messages" );
      XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
      xulDomContainer.addEventHandler( this );
      toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );

      ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
      spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
      swtToolBar.layout( true, true );
    } catch ( Throwable t ) {
      log.logError( toString(), Const.getStackTracker( t ) );
      new ErrorDialog( transGridComposite.getShell(),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
        new Exception( t ) );
    }
  }
 
Example #6
Source File: TransHistoryDelegate.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void addLogTableTabs() {
  // Create a nested tab folder in the tab item, on the history composite...
  //
  tabFolder = new CTabFolder( transHistoryComposite, SWT.MULTI );
  spoon.props.setLook( tabFolder, Props.WIDGET_STYLE_TAB );

  FormData fdTabFolder = new FormData();
  fdTabFolder.left = new FormAttachment( 0, 0 ); // First one in the left top corner
  fdTabFolder.top = new FormAttachment( (Control) toolbar.getManagedObject(), 0 );
  fdTabFolder.right = new FormAttachment( 100, 0 );
  fdTabFolder.bottom = new FormAttachment( 100, 0 );
  tabFolder.setLayoutData( fdTabFolder );

  models = new TransHistoryLogTab[transMeta.getLogTables().size()];
  for ( int i = 0; i < models.length; i++ ) {
    models[i] = new TransHistoryLogTab( tabFolder, transMeta.getLogTables().get( i ) );
  }
}
 
Example #7
Source File: TransHistoryDelegate.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void addToolBar() {
  try {
    KettleXulLoader loader = new KettleXulLoader();
    loader.setIconsSize( 16, 16 );
    loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
    ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
    XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
    xulDomContainer.addEventHandler( this );
    toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );

    refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "refresh-history" );
    fetchNextBatchButton =
      (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-next-batch-history" );
    fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-all-history" );

    ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
    spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
    swtToolBar.layout( true, true );
  } catch ( Throwable t ) {
    log.logError( Const.getStackTracker( t ) );
    new ErrorDialog( transHistoryComposite.getShell(),
      BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
      BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
      new Exception( t ) );
  }
}
 
Example #8
Source File: TransLogDelegate.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
private void addToolBar() {

    try {
      XulLoader loader = new KettleXulLoader();
      loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
      ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
      XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_LOG_TOOLBAR, bundle );
      xulDomContainer.addEventHandler( this );
      toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );

      ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
      spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
      swtToolBar.layout( true, true );
    } catch ( Throwable t ) {
      log.logError( Const.getStackTracker( t ) );
      new ErrorDialog( transLogComposite.getShell(),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
        BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR ),
        new Exception( t ) );
    }
  }
 
Example #9
Source File: SQLModelGenerator.java    From pentaho-metadata with GNU Lesser General Public License v2.1 6 votes vote down vote up
public SQLModelGenerator( String modelName, String connectionName, int[] columnTypes, String[] columnNames,
    String query, Boolean securityEnabled, List<String> users, List<String> roles, int defaultAcls, String createdBy ) {
  if ( !Props.isInitialized() ) {
    Props.init( Props.TYPE_PROPERTIES_EMPTY );
  }
  this.query = query;
  this.connectionName = connectionName;
  this.columnTypes = columnTypes;
  this.columnNames = columnNames;
  this.modelName = modelName;
  this.securityEnabled = securityEnabled;
  this.users = users;
  this.roles = roles;
  this.defaultAcls = defaultAcls;
  this.createdBy = createdBy;
}
 
Example #10
Source File: CapabilityManagerDialog.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
public static void main( String[] args ) {

    Display display = new Display(  );
    try {
      KettleEnvironment.init();

      PropsUI.init( display, Props.TYPE_PROPERTIES_SPOON );

      KettleLogStore
          .init( PropsUI.getInstance().getMaxNrLinesInLog(), PropsUI.getInstance().getMaxLogLineTimeoutMinutes() );

    } catch ( KettleException e ) {
      e.printStackTrace();
    }

    KettleClientEnvironment.getInstance().setClient( KettleClientEnvironment.ClientType.SPOON );
    Shell shell = new Shell( display, SWT.DIALOG_TRIM );
    shell.open();
    CapabilityManagerDialog capabilityManagerDialog = new CapabilityManagerDialog( shell );
    capabilityManagerDialog.open();
    while ( !shell.isDisposed() ) {
      if ( !display.readAndDispatch() ) {
        display.sleep();
      }
    }
  }
 
Example #11
Source File: SFTPPutDialogTest.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void hackPropsUi() throws Exception {
  Field props = getPropsField();
  if ( props == null ) {
    throw new IllegalStateException( "Cannot find 'props' field in " + Props.class.getName() );
  }

  Object value = FieldUtils.readStaticField( props, true );
  if ( value == null ) {
    PropsUI mock = mock( PropsUI.class );
    FieldUtils.writeStaticField( props, mock, true );
    changedPropsUi = true;
  } else {
    changedPropsUi = false;
  }
}
 
Example #12
Source File: TextFileInputDialogTest.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void hackPropsUi() throws Exception {
  Field props = getPropsField();
  if ( props == null ) {
    throw new IllegalStateException( "Cannot find 'props' field in " + Props.class.getName() );
  }

  Object value = FieldUtils.readStaticField( props, true );
  if ( value == null ) {
    PropsUI mock = mock( PropsUI.class );
    FieldUtils.writeStaticField( props, mock, true );
    changedPropsUi = true;
  } else {
    changedPropsUi = false;
  }
}
 
Example #13
Source File: PreviewRowsDialogTest.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
@Test
public void getDataForRow() throws Exception {

  RowMetaInterface rowMetaInterface = Mockito.mock( RowMetaInterface.class );
  Mockito.when( rowMetaInterface.size() ).thenReturn( 3 );
  Mockito.when( rowMetaInterface.getValueMeta( Mockito.anyInt() ) ).thenReturn( Mockito.mock( ValueMetaInterface.class ) );

  Field propsField = Props.class.getDeclaredField( "props" );
  propsField.setAccessible( true );
  propsField.set( PropsUI.class, Mockito.mock( PropsUI.class ) );

  PreviewRowsDialog previewRowsDialog = new PreviewRowsDialog( Mockito.mock( Shell.class ), Mockito.mock( VariableSpace.class ), SWT.None, "test",
          rowMetaInterface, Collections.emptyList() );

  //run without NPE
  int actualResult = previewRowsDialog.getDataForRow( Mockito.mock( TableItem.class ), null );
  Assert.assertEquals( 0, actualResult );
}
 
Example #14
Source File: RestorePDIEnvironment.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
void cleanUp() {
    KettleClientEnvironment.reset();
    PluginRegistry.getInstance().reset();
    MetricsRegistry.getInstance().reset();
    ExtensionPointMap.getInstance().reset();
    if ( KettleLogStore.isInitialized() ) {
      KettleLogStore.getInstance().reset();
    }
    KettleLogStore.setLogChannelInterfaceFactory( new LogChannelFactory() );
    if ( Props.isInitialized() ) {
      Props.getInstance().reset();
    }
    KettleVFS.getInstance().reset();
    XMLHandlerCache.getInstance().clear();
    ValueMetaFactory.pluginRegistry = PluginRegistry.getInstance();
    // under no circumstance reset the LoggingRegistry
//    LoggingRegistry.getInstance().reset();
  }
 
Example #15
Source File: TransExecutionConfiguration.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
public String[] getArgumentStrings() {
  if ( arguments == null || arguments.size() == 0 ) {
    return null;
  }

  String[] argNames = arguments.keySet().toArray( new String[arguments.size()] );
  Arrays.sort( argNames );

  String[] values = new String[argNames.length];
  for ( int i = 0; i < argNames.length; i++ ) {
    if ( argNames[i].equalsIgnoreCase( Props.STRING_ARGUMENT_NAME_PREFIX + ( i + 1 ) ) ) {
      values[i] = arguments.get( argNames[i] );
    }
  }

  return values;
}
 
Example #16
Source File: Translator2.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
public static void main( String[] args ) throws Exception {

    if ( args.length != 2 ) {
      System.err.println( "Usage: Translator <translator.xml> <path-to-source>" );
      System.err.println( "Example:" );
      System.err.println( "sh translator.sh translator.xml ." );
      System.exit( 1 );
    }

    KettleClientEnvironment.init();

    String configFile = args[0];
    String sourceFolder = args[1];

    Display display = new Display();
    LogChannelInterface log = new LogChannel( APP_NAME );
    PropsUI.init( display, Props.TYPE_PROPERTIES_SPOON );

    Translator2 translator = new Translator2( display );
    translator.loadConfiguration( configFile, sourceFolder );
    translator.open();

    try {
      while ( !display.isDisposed() ) {
        if ( !display.readAndDispatch() ) {
          display.sleep();
        }
      }
    } catch ( Throwable e ) {
      log.logError( BaseMessages.getString( PKG, "i18n.UnexpectedError", e.getMessage() ) );
      log.logError( Const.getStackTracker( e ) );
    }
  }
 
Example #17
Source File: MQTTConsumerTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setupClass() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
  StepPluginType.getInstance().handlePluginAnnotation(
    MQTTConsumerMeta.class,
    MQTTConsumerMeta.class.getAnnotation( org.pentaho.di.core.annotations.Step.class ),
    Collections.emptyList(), false, null );
}
 
Example #18
Source File: TransMetaConverterTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
}
 
Example #19
Source File: JmsConsumerMetaTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
  StepPluginType.getInstance().handlePluginAnnotation(
    JmsConsumerMeta.class,
    JmsConsumerMeta.class.getAnnotation( org.pentaho.di.core.annotations.Step.class ),
    Collections.emptyList(), false, null );
}
 
Example #20
Source File: SalesforceInputDialogTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void hackPropsUi() throws Exception {
  Field props = getPropsField();
  if ( props == null ) {
    throw new IllegalStateException( "Cannot find 'props' field in " + Props.class.getName() );
  }
  Object value = FieldUtils.readStaticField( props, true );
  if ( value == null ) {
    PropsUI mock = mock( PropsUI.class );
    FieldUtils.writeStaticField( props, mock, true );
    changedPropsUi = true;
  } else {
    changedPropsUi = false;
  }
}
 
Example #21
Source File: SpoonBrowser.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
protected void addToolBar() {

    try {
      XulLoader loader = new KettleXulLoader();
      loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
      ResourceBundle bundle = GlobalMessages.getBundle( "org/pentaho/di/ui/spoon/messages/messages" );
      XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_BROWSER_TOOLBAR, bundle );
      xulDomContainer.addEventHandler( this );
      toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );

      @SuppressWarnings( "unused" )
      ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
      spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );

      // Add a URL

      back = (XulToolbarbutton) toolbar.getElementById( "browse-back" );
      back.setDisabled( true );
      forward = (XulToolbarbutton) toolbar.getElementById( "browse-forward" );
      forward.setLabel( BaseMessages.getString( PKG, "SpoonBrowser.Dialog.Forward" ) );
      forward.setDisabled( false );
      location = (XulTextbox) toolbar.getElementById( "browser-address" );
      Control toolbarControl = (Control) toolbar.getManagedObject();
      toolbarControl.setLayoutData( new FormData() );
      toolbarControl.setParent( composite );
    } catch ( Exception e ) {
      e.printStackTrace();
      new ErrorDialog(
        shell, BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ), BaseMessages
          .getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_BROWSER_TOOLBAR ), e );
    }
  }
 
Example #22
Source File: SubtransExecutorTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
}
 
Example #23
Source File: JobImportIT.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws KettleException {
  KettleEnvironment.init();
  Props.init( Props.TYPE_PROPERTIES_SPOON );

  deleteFolder( new File( REPOSITORY_ROOT_DIR ) );

  KettleFileRepositoryMeta repositoryMeta = new KettleFileRepositoryMeta( FILE_REPOSITORY_ID, FILE_REPOSITORY_NAME,
    FILE_REPOSITORY_DESC, REPOSITORY_ROOT_DIR );
  repository = new KettleFileRepository();
  repository.init( repositoryMeta );
  repository.connect( null, null );
  importer = new RepositoryImporter( repository );

}
 
Example #24
Source File: TransWebSocketEngineAdapterTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
}
 
Example #25
Source File: JobMetaPrivateDbTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void initKettle() throws Exception {
  if ( Props.isInitialized() ) {
    Props.getInstance().setOnlyUsedConnectionsSavedToXML( false );
  }
  KettleEnvironment.init();
}
 
Example #26
Source File: AbstractMetaTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Test
public void testShouldOverwrite() {
  assertTrue( meta.shouldOverwrite( null, null, null, null ) );
  Props.init( Props.TYPE_PROPERTIES_EMPTY );
  assertTrue( meta.shouldOverwrite( null, Props.getInstance(), "message", "remember" ) );

  Props.getInstance().setProperty( Props.STRING_ASK_ABOUT_REPLACING_DATABASES, "Y" );
  OverwritePrompter prompter = mock( OverwritePrompter.class );
  when( prompter.overwritePrompt( "message", "remember", Props.STRING_ASK_ABOUT_REPLACING_DATABASES ) )
    .thenReturn( false );
  assertFalse( meta.shouldOverwrite( prompter, Props.getInstance(), "message", "remember" ) );
}
 
Example #27
Source File: TextFileInputIT.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
}
 
Example #28
Source File: PropertyOutputIT.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
}
 
Example #29
Source File: ConstantIT.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
}
 
Example #30
Source File: SafeStopTest.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws Exception {
  KettleClientEnvironment.init();
  PluginRegistry.addPluginType( StepPluginType.getInstance() );
  PluginRegistry.init();
  if ( !Props.isInitialized() ) {
    Props.init( 0 );
  }
}