当前位置: 首页>>代码示例>>Java>>正文


Java Props类代码示例

本文整理汇总了Java中org.pentaho.di.core.Props的典型用法代码示例。如果您正苦于以下问题:Java Props类的具体用法?Java Props怎么用?Java Props使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Props类属于org.pentaho.di.core包,在下文中一共展示了Props类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getArgumentStrings

import org.pentaho.di.core.Props; //导入依赖的package包/类
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;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:TransExecutionConfiguration.java

示例2: showArguments

import org.pentaho.di.core.Props; //导入依赖的package包/类
public void showArguments() {

		RowMetaAndData allArgs = new RowMetaAndData();

		for (int ii = 0; ii < arguments.length; ++ii) {
			allArgs.addValue(new ValueMeta(Props.STRING_ARGUMENT_NAME_PREFIX + (1 + ii), ValueMetaInterface.TYPE_STRING), arguments[ii]);
		}

		// Now ask the use for more info on these!
		EnterStringsDialog esd = new EnterStringsDialog(shell, SWT.NONE, allArgs);
		esd.setTitle(Messages.getString("Spoon.Dialog.ShowArguments.Title"));
		esd.setMessage(Messages.getString("Spoon.Dialog.ShowArguments.Message"));
		esd.setReadOnly(true);
		esd.setShellImage(GUIResource.getInstance().getImageLogoSmall());
		esd.open();
	}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:Spoon.java

示例3: main

import org.pentaho.di.core.Props; //导入依赖的package包/类
public static void main(String[] args)
{
    Display display = new Display();
    LogWriter log = LogWriter.getInstance();
    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(APP_NAME, "An unexpected error occurred : "+e.getMessage());
        log.logError(APP_NAME, Const.getStackTracker(e));
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:23,代码来源:Translator.java

示例4: main

import org.pentaho.di.core.Props; //导入依赖的package包/类
public static void main(String[] args)
{
    Display display = new Display();
    LogWriter log = LogWriter.getInstance();
    PropsUI.init(display, Props.TYPE_PROPERTIES_SPOON);
    
    Translator2 translator = new Translator2(display);
    translator.loadConfiguration();
    translator.open();
    
    try
    {
        while (!display.isDisposed ()) 
        {
            if (!display.readAndDispatch()) display.sleep ();
        }
    }
    catch(Throwable e)
    {
        log.logError(APP_NAME, Messages.getString("i18n.UnexpectedError",e.getMessage()));
        log.logError(APP_NAME, Const.getStackTracker(e));
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:Translator2.java

示例5: showArguments

import org.pentaho.di.core.Props; //导入依赖的package包/类
public void showArguments() {

    RowMetaAndData allArgs = new RowMetaAndData();

    for (int ii = 0; ii < arguments.length; ++ii) {
      allArgs.addValue(new ValueMeta(Props.STRING_ARGUMENT_NAME_PREFIX + (1 + ii), ValueMetaInterface.TYPE_STRING),
          arguments[ii]);
    }

    // Now ask the use for more info on these!
    EnterStringsDialog esd = new EnterStringsDialog(shell, SWT.NONE, allArgs);
    esd.setTitle(BaseMessages.getString(PKG, "Spoon.Dialog.ShowArguments.Title"));
    esd.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.ShowArguments.Message"));
    esd.setReadOnly(true);
    esd.setShellImage(GUIResource.getInstance().getImageLogoSmall());
    esd.open();
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:Spoon.java

示例6: main

import org.pentaho.di.core.Props; //导入依赖的package包/类
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));
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:Translator.java

示例7: main

import org.pentaho.di.core.Props; //导入依赖的package包/类
public static void main(String[] args) throws Exception
  {
Display display = new Display();
      LogChannelInterface log = new LogChannel(APP_NAME);
      PropsUI.init(display, Props.TYPE_PROPERTIES_SPOON);
      
      Translator2 translator = new Translator2(display);
      translator.loadConfiguration();
      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));
      }
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:Translator2.java

示例8: SQLModelGenerator

import org.pentaho.di.core.Props; //导入依赖的package包/类
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;
}
 
开发者ID:pentaho,项目名称:pentaho-metadata,代码行数:17,代码来源:SQLModelGenerator.java

示例9: getArgumentStrings

import org.pentaho.di.core.Props; //导入依赖的package包/类
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;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:TransExecutionConfiguration.java

示例10: main

import org.pentaho.di.core.Props; //导入依赖的package包/类
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();
      }
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:CapabilityManagerDialog.java

示例11: addToolBar

import org.pentaho.di.core.Props; //导入依赖的package包/类
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 ) );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:JobLogDelegate.java

示例12: addLogTableTabs

import org.pentaho.di.core.Props; //导入依赖的package包/类
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 ) );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:JobHistoryDelegate.java

示例13: addToolBar

import org.pentaho.di.core.Props; //导入依赖的package包/类
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 ) );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:26,代码来源:JobHistoryDelegate.java

示例14: showArguments

import org.pentaho.di.core.Props; //导入依赖的package包/类
public void showArguments() {

    RowMetaAndData allArgs = new RowMetaAndData();

    for ( int ii = 0; ii < arguments.length; ++ii ) {
      allArgs.addValue( new ValueMetaString(
        Props.STRING_ARGUMENT_NAME_PREFIX + ( 1 + ii ) ), arguments[ii] );
    }

    // Now ask the use for more info on these!
    EnterStringsDialog esd = new EnterStringsDialog( shell, SWT.NONE, allArgs );
    esd.setTitle( BaseMessages.getString( PKG, "Spoon.Dialog.ShowArguments.Title" ) );
    esd.setMessage( BaseMessages.getString( PKG, "Spoon.Dialog.ShowArguments.Message" ) );
    esd.setReadOnly( true );
    esd.setShellImage( GUIResource.getInstance().getImageLogoSmall() );
    esd.open();
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:Spoon.java

示例15: addToolBar

import org.pentaho.di.core.Props; //导入依赖的package包/类
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 ) );
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:TransGridDelegate.java


注:本文中的org.pentaho.di.core.Props类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。