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

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

java 2次浏览

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

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

示例1: open

点赞 2

import org.pentaho.di.ui.spoon.SpoonPluginManager; //导入依赖的package包/类
public boolean open() {
  try {

    KettleXulLoader theLoader = new KettleXulLoader();
    theLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
    theLoader.setSettingsManager( new DefaultSettingsManager( new File( Const.getKettleDirectory()
      + Const.FILE_SEPARATOR + "xulSettings.properties" ) ) );
    theLoader.setOuterContext( this.shell );

    this.container = theLoader.loadXul( XUL, new XulDatabaseExplorerResourceBundle() );

    XulDialog theExplorerDialog =
      (XulDialog) this.container.getDocumentRoot().getElementById( "databaseExplorerDialog" );

    SpoonPluginManager.getInstance().applyPluginsForContainer( "database_dialog", container );

    this.controller =
      new XulDatabaseExplorerController(
        (Shell) theExplorerDialog.getRootObject(), this.databaseMeta, this.databases, look );

    this.container.addEventHandler( this.controller );

    this.runner = new SwtXulRunner();
    this.runner.addContainer( this.container );

    this.runner.initialize();

    this.controller.setSelectedSchemaAndTable( schemaName, selectedTable );

    // show dialog if connection is success only.
    if ( controller.getActionStatus() == UiPostActionStatus.OK ) {
      theExplorerDialog.show();
    }

  } catch ( Exception e ) {
    LogChannel.GENERAL.logError( "Error exploring database", e );
  }
  return this.controller.getSelectedTable() != null;
}
 

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

示例2: applyRoleActionPermission

点赞 2

import org.pentaho.di.ui.spoon.SpoonPluginManager; //导入依赖的package包/类
/**
 * Save the permission for the selected role
 */
public void applyRoleActionPermission() {
  XulMessageBox messageBox = this.getMessageBox();
  IUIRole role = null;
  IUIAbsRole absRole = null;
  try {
    role = absSecurity.getSelectedRole();
    if ( role instanceof IUIAbsRole ) {
      absRole = (IUIAbsRole) role;
    } else {
      throw new IllegalStateException();
    }
    ( (IAbsSecurityManager) service ).setLogicalRoles( absRole.getName(), absRole.getLogicalRoles() );
    messageBox.setTitle( BaseMessages.getString( PKG, "Dialog.Success" ) );//$NON-NLS-1$
    messageBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) );//$NON-NLS-1$
    messageBox.setMessage( BaseMessages.getString( PKG, "AbsController.RoleActionPermission.Success" ) );//$NON-NLS-1$
    messageBox.open();
    // Refresh permissions in open tabs
    SpoonPluginManager.getInstance().notifyLifecycleListeners(
        SpoonLifecycleListener.SpoonLifeCycleEvent.REPOSITORY_CHANGED );
  } catch ( KettleException e ) {
    messageBox.setTitle( BaseMessages.getString( PKG, "Dialog.Error" ) );//$NON-NLS-1$
    messageBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) );//$NON-NLS-1$
    messageBox.setMessage( BaseMessages.getString( PKG,
        "AbsController.RoleActionPermission.UnableToApplyPermissions", role.getName(), e.getLocalizedMessage() ) );//$NON-NLS-1$
    messageBox.open();
  }
}
 

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

示例3: applySystemRoleActionPermission

点赞 2

import org.pentaho.di.ui.spoon.SpoonPluginManager; //导入依赖的package包/类
/**
 * Save the permission for the selected system role
 */
public void applySystemRoleActionPermission() {
  XulMessageBox messageBox = this.getMessageBox();
  IUIRole role = null;
  IUIAbsRole absRole = null;
  try {
    role = absSecurity.getSelectedSystemRole();
    if ( role instanceof IUIAbsRole ) {
      absRole = (IUIAbsRole) role;
    } else {
      throw new IllegalStateException();
    }
    ( (IAbsSecurityManager) service ).setLogicalRoles( absRole.getName(), absRole.getLogicalRoles() );
    messageBox.setTitle( BaseMessages.getString( PKG, "Dialog.Success" ) );//$NON-NLS-1$
    messageBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) );//$NON-NLS-1$
    messageBox.setMessage( BaseMessages.getString( PKG, "AbsController.RoleActionPermission.Success" ) );//$NON-NLS-1$
    messageBox.open();
    // Refresh permissions in open tabs
    SpoonPluginManager.getInstance().notifyLifecycleListeners(
        SpoonLifecycleListener.SpoonLifeCycleEvent.REPOSITORY_CHANGED );
  } catch ( KettleException e ) {
    messageBox.setTitle( BaseMessages.getString( PKG, "Dialog.Error" ) );//$NON-NLS-1$
    messageBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) );//$NON-NLS-1$
    messageBox.setMessage( BaseMessages.getString( PKG,
        "AbsController.RoleActionPermission.UnableToApplyPermissions", role.getName(), e.getLocalizedMessage() ) );//$NON-NLS-1$
    messageBox.open();
  }
}
 

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

示例4: open

点赞 1

import org.pentaho.di.ui.spoon.SpoonPluginManager; //导入依赖的package包/类
public boolean open() {
	try {

		SwtXulLoader theLoader = new SwtXulLoader();
     theLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
		theLoader.setSettingsManager(new DefaultSettingsManager(new File(Const.getKettleDirectory() + Const.FILE_SEPARATOR + "xulSettings.properties")));
		theLoader.setOuterContext(this.shell);

		this.container = theLoader.loadXul(XUL, new XulDatabaseExplorerResourceBundle());

     XulDialog theExplorerDialog = (XulDialog) this.container.getDocumentRoot().getElementById("databaseExplorerDialog");
     
		SpoonPluginManager.getInstance().applyPluginsForContainer("database_dialog", container);


    this.controller = new XulDatabaseExplorerController((Shell) theExplorerDialog.getRootObject(), this.databaseMeta, this.databases, look);
    
    
		this.container.addEventHandler(this.controller);

		this.runner = new SwtXulRunner();
		this.runner.addContainer(this.container);
		this.runner.initialize();
		
     this.controller.setSelectedSchemaAndTable(schemaName, selectedTable);

		theExplorerDialog.show();

	} catch (Exception e) {
		logger.info(e);
		e.printStackTrace();
	}
	return this.controller.getSelectedTable() != null;
}
 

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


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