• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RepositoryDialogInterface类的典型用法和代码示例

java 2次浏览

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

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

示例1: editRepository

点赞 3

import org.pentaho.di.ui.repository.dialog.RepositoryDialogInterface; //导入依赖的package包/类
public void editRepository() {
  try {
      PluginInterface plugin = null; 
      RepositoryMeta ri = input.searchRepository(model.getSelectedRepository().getName());
      if (ri != null) {
        plugin = PluginRegistry.getInstance().getPlugin(RepositoryPluginType.class, ri.getId());
        if (plugin == null) {
          throw new KettleException(BaseMessages.getString(PKG, "RepositoryLogin.ErrorFindingPlugin", ri.getId())); //$NON-NLS-1$
        }
      }
        RepositoryDialogInterface dd = getRepositoryDialog(plugin, ri, input, this.shell);
        if (dd.open(MODE.EDIT) != null) {
          fillRepositories();
          int idx = input.indexOfRepository(ri);
          model.setSelectedRepository(input.getRepository(idx));
          writeData();
        }
  } catch (Exception e) {
    log.logDetailed(BaseMessages.getString(PKG, "RepositoryLogin.ErrorEditingRepository", e.getLocalizedMessage()));//$NON-NLS-1$
    new ErrorDialog(shell, BaseMessages.getString(PKG, "Dialog.Error"), BaseMessages.getString(PKG, "RepositoryLogin.ErrorEditingRepository", e.getLocalizedMessage()), e); //$NON-NLS-1$ //$NON-NLS-2$
  }
}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:23,
代码来源:RepositoriesHelper.java

示例2: editRepository

点赞 3

import org.pentaho.di.ui.repository.dialog.RepositoryDialogInterface; //导入依赖的package包/类
public void editRepository() {
  try {
    PluginInterface plugin = null;
    RepositoryMeta ri = input.searchRepository( model.getSelectedRepository().getName() );
    if ( ri != null ) {
      plugin = PluginRegistry.getInstance().getPlugin( RepositoryPluginType.class, ri.getId() );
      if ( plugin == null ) {
        throw new KettleException( BaseMessages
          .getString( PKG, "RepositoryLogin.ErrorFindingPlugin", ri.getId() ) );
      }
    }
    RepositoryDialogInterface dd = getRepositoryDialog( plugin, ri, input, this.shell );
    if ( dd.open( MODE.EDIT ) != null ) {
      fillRepositories();
      int idx = input.indexOfRepository( ri );
      model.setSelectedRepository( input.getRepository( idx ) );
      writeData();
    }
  } catch ( Exception e ) {
    log.logDetailed( BaseMessages.getString( PKG, "RepositoryLogin.ErrorEditingRepository", e
      .getLocalizedMessage() ) );
    new ErrorDialog( shell, BaseMessages.getString( PKG, "Dialog.Error" ), BaseMessages.getString(
      PKG, "RepositoryLogin.ErrorEditingRepository", e.getLocalizedMessage() ), e );
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:26,
代码来源:RepositoriesHelper.java

示例3: registerUIPluginObjectTypes

点赞 3

import org.pentaho.di.ui.repository.dialog.RepositoryDialogInterface; //导入依赖的package包/类
/**
 * The core plugin types don't know about UI classes. This method adds those in before initialization.
 *
 * TODO: create a SpoonLifecycle listener that can notify interested parties of a pre-initialization state so this can
 * happen in those listeners.
 */
private static void registerUIPluginObjectTypes() {
  RepositoryPluginType repositoryPluginType = RepositoryPluginType.getInstance();
  repositoryPluginType.addObjectType( RepositoryRevisionBrowserDialogInterface.class, "version-browser-classname" );
  repositoryPluginType.addObjectType( RepositoryDialogInterface.class, "dialog-classname" );

  PluginRegistry.addPluginType( SpoonPluginType.getInstance() );

  SpoonPluginType.getInstance().getPluginFolders().add( new PluginFolder( "plugins/repositories", false, true ) );

  LifecyclePluginType.getInstance().getPluginFolders().add( new PluginFolder( "plugins/spoon", false, true ) );
  LifecyclePluginType.getInstance().getPluginFolders().add( new PluginFolder( "plugins/repositories", false, true ) );

  PluginRegistry.addPluginType( JobDialogPluginType.getInstance() );
  PluginRegistry.addPluginType( TransDialogPluginType.getInstance() );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:22,
代码来源:Spoon.java

示例4: registerUIPluginObjectTypes

点赞 2

import org.pentaho.di.ui.repository.dialog.RepositoryDialogInterface; //导入依赖的package包/类
/**
 * The core plugin types don't know about UI classes. This method adds those
 * in before initialization.
 * 
 * TODO: create a SpoonLifecycle listener that can notify interested parties
 * of a pre-initialization state so this can happen in those listeners.
 */
private static void registerUIPluginObjectTypes() {
  RepositoryPluginType.getInstance().addObjectType(RepositoryRevisionBrowserDialogInterface.class,
      "version-browser-classname");
  RepositoryPluginType.getInstance().addObjectType(RepositoryDialogInterface.class, "dialog-classname");

  PluginRegistry.addPluginType(SpoonPluginType.getInstance());

  SpoonPluginType.getInstance().getPluginFolders().add(new PluginFolder("plugins/repositories", false, true));

  LifecyclePluginType.getInstance().getPluginFolders().add(new PluginFolder("plugins/spoon", false, true));
  LifecyclePluginType.getInstance().getPluginFolders().add(new PluginFolder("plugins/repositories", false, true));

}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:21,
代码来源:Spoon.java

示例5: getRepositoryDialog

点赞 2

import org.pentaho.di.ui.repository.dialog.RepositoryDialogInterface; //导入依赖的package包/类
protected RepositoryDialogInterface getRepositoryDialog( PluginInterface plugin, RepositoryMeta repositoryMeta,
  RepositoriesMeta input2, Shell shell ) throws Exception {
  String className = repositoryMeta.getDialogClassName();
  Class<? extends RepositoryDialogInterface> dialogClass =
    PluginRegistry.getInstance().getClass( plugin, className );
  Constructor<?> constructor =
    dialogClass.getConstructor( Shell.class, Integer.TYPE, RepositoryMeta.class, RepositoriesMeta.class );
  return (RepositoryDialogInterface) constructor.newInstance( new Object[] {
    shell, Integer.valueOf( SWT.NONE ), repositoryMeta, input, } );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:11,
代码来源:RepositoriesHelper.java

示例6: getRepositoryDialog

点赞 2

import org.pentaho.di.ui.repository.dialog.RepositoryDialogInterface; //导入依赖的package包/类
protected RepositoryDialogInterface getRepositoryDialog(PluginInterface plugin, RepositoryMeta repositoryMeta, RepositoriesMeta input2, Shell shell) throws Exception {
String className = repositoryMeta.getDialogClassName();
   Class<? extends RepositoryDialogInterface> dialogClass = PluginRegistry.getInstance().getClass(plugin, className);
   Constructor<?> constructor = dialogClass.getConstructor(Shell.class, Integer.TYPE, RepositoryMeta.class, RepositoriesMeta.class);
   return (RepositoryDialogInterface) constructor.newInstance(new Object[] { shell, Integer.valueOf(SWT.NONE), repositoryMeta, input, });
 }
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:7,
代码来源:RepositoriesHelper.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)