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


Java SpoonDelegates类代码示例

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


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

示例1: setPromptToSave

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
private SpoonBrowser setPromptToSave( int buttonPressed, boolean canbeClosed ) throws Exception {
  TabMapEntry mockTabMapEntry = mock( TabMapEntry.class );
  TabSet mockTabSet = mock( TabSet.class );
  ArrayList<TabMapEntry> lTabs = new ArrayList<>();
  lTabs.add( mockTabMapEntry );

  SpoonBrowser mockSpoonBrowser = mock( SpoonBrowser.class );

  spoon.delegates = mock( SpoonDelegates.class );
  spoon.delegates.tabs = mock( SpoonTabsDelegate.class );
  spoon.tabfolder = mockTabSet;

  doReturn( lTabs ).when( spoon.delegates.tabs ).getTabs();
  doReturn( mockSpoonBrowser ).when( mockTabMapEntry ).getObject();
  doReturn( canbeClosed ).when( mockSpoonBrowser ).canBeClosed();
  doReturn( buttonPressed ).when( mockSpoonBrowser ).showChangedWarning();

  doCallRealMethod().when( spoon ).promptForSave();

  return mockSpoonBrowser;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:SpoonTest.java

示例2: schemaSelection

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
@Override
public void schemaSelection( PartitionSettings settings, Shell shell, SpoonDelegates delegates )
  throws KettleException {
  String schema =
    super.askForSchema( settings.getSchemaNamesArray(), shell, settings.getDefaultSelectedSchemaIndex() );
  super.processForKnownSchema( schema, settings );
  if ( !StringUtil.isEmpty( schema ) ) {
    askForField( settings, delegates );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:SpecialMethodProcessor.java

示例3: askForField

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
private void askForField( PartitionSettings settings, SpoonDelegates delegates ) throws KettleException {
  StepDialogInterface partitionDialog =
    delegates.steps.getPartitionerDialog( settings.getStepMeta(), settings.getStepMeta().getStepPartitioningMeta(),
      settings.getTransMeta() );
  String  fieldName = partitionDialog.open();
  if ( StringUtil.isEmpty( fieldName ) ) {
    settings.rollback( settings.getBefore() );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:SpecialMethodProcessor.java

示例4: schemaSelection

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
@Override
public void schemaSelection( PartitionSettings settings, Shell shell, SpoonDelegates delegates )
  throws KettlePluginException {
  String schema =
    super.askForSchema( settings.getSchemaNamesArray(), shell, settings.getDefaultSelectedSchemaIndex() );
  super.processForKnownSchema( schema, settings );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:MirrorMethodProcessor.java

示例5: setUp

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  spoon = mock( Spoon.class );
  spoon.delegates = mock( SpoonDelegates.class );
  spoon.delegates.tabs = mock( SpoonTabsDelegate.class );
  spoon.tabfolder = mock( TabSet.class );

  doCallRealMethod().when( spoon ).getActiveJobGraph();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:SpoonActiveJobGraphTest.java

示例6: setUp

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
@Before
public void setUp() {
  spoon = mock( Spoon.class );
  //when( spoon.getRepository() ).thenReturn( spoon.rep );
  spoonDelegates = mock( SpoonDelegates.class );
  spoonDelegates.jobs = new SpoonJobDelegate( spoon );
  spoonDelegates.trans = new SpoonTransformationDelegate( spoon );
  spoonDelegates.db = new SpoonDBDelegate( spoon );
  spoonDelegates.slaves = new SpoonSlaveDelegate( spoon );
  spoonDelegates.partitions = new SpoonPartitionsDelegate( spoon );
  spoonDelegates.clusters = new SpoonClustersDelegate( spoon );
  spoon.delegates = spoonDelegates;
  sharedUtil = new SharedObjectSyncUtil( spoon );
  repository = mock( Repository.class );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:SharedObjectSyncUtilTest.java

示例7: setUp

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  spoon = mock( Spoon.class );
  spoon.delegates = mock( SpoonDelegates.class );
  spoon.delegates.slaves = new SpoonSlaveDelegate( spoon );

  TreeItem mockItem = mock( TreeItem.class );
  when( spoon.createTreeItem( any( TreeItem.class ), anyString(), any( Image.class ) ) ).thenReturn( mockItem );

  doCallRealMethod().when( spoon )
    .refreshSlavesSubtree( any( TreeItem.class ), any( AbstractMeta.class ), any( GUIResource.class ) );

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

示例8: schemaSelection

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
@Override
public void schemaSelection( PartitionSettings settings, Shell shell, SpoonDelegates delegates ) {
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:4,代码来源:NoneMethodProcessor.java

示例9: prepareSetShellTextTests

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
private static Shell prepareSetShellTextTests( Spoon spoon, AbstractMeta abstractMeta, boolean versionEnabled,
    boolean isTransformation, boolean repIsNull, boolean revIsNull, boolean hasChanged, boolean nameIsNull,
    boolean filenameIsNull, boolean tabNameIsNull ) {
  Shell mockShell = mock( Shell.class );
  ObjectRevision mockObjectRevision = revIsNull ? null : mock( ObjectRevision.class );
  RepositoryDirectory mockRepDirectory = mock( RepositoryDirectory.class );
  Repository mockRepository = repIsNull ? null : mock( Repository.class );
  RepositorySecurityProvider mockRepSecurityProvider = mock( RepositorySecurityProvider.class );
  SpoonDelegates mockDelegate = mock( SpoonDelegates.class );
  SpoonTabsDelegate mockDelegateTabs = mock( SpoonTabsDelegate.class );
  spoon.rep = mockRepository;
  spoon.delegates = mockDelegate;
  mockDelegate.tabs = mockDelegateTabs;

  doCallRealMethod().when( spoon ).openSpoon();
  doCallRealMethod().when( spoon ).setShellText();

  doReturn( mockShell ).when( spoon ).getShell();
  if ( !tabNameIsNull ) {
    doReturn( "tabName" ).when( spoon ).getActiveTabText();
  }

  doReturn( false ).when( mockShell ).isDisposed();
  setTransJobValues( abstractMeta, spoon, mockObjectRevision, mockRepDirectory, isTransformation, hasChanged,
      nameIsNull, filenameIsNull );

  if ( !revIsNull ) {
    doReturn( "1.0" ).when( mockObjectRevision ).getName();
  }
  doReturn( "/admin" ).when( mockRepDirectory ).getPath();

  Mockito.doReturn( null ).when( abstractMeta ).getVersioningEnabled();
  if ( !repIsNull ) {
    doReturn( mockRepSecurityProvider ).when( mockRepository ).getSecurityProvider();
    doReturn( versionEnabled ).when( mockRepSecurityProvider ).isVersioningEnabled( anyString() );
  }

  doReturn( "RepositoryName" ).when( spoon ).getRepositoryName();

  doReturn( new ArrayList<TabMapEntry>() ).when( mockDelegateTabs ).getTabs();

  try {
    spoon.openSpoon();
  } catch ( NullPointerException e ) {
    //ignore work is done
  }

  spoon.setShellText();

  return mockShell;

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

示例10: prepareSetSaveTests

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
private static void prepareSetSaveTests( Spoon spoon, LogChannelInterface log, SpoonPerspective spoonPerspective,
    AbstractMeta metaData, boolean repIsNull, boolean basicLevel, String perspectiveID, boolean saveToRepository,
    boolean saveXMLFile, String fileType, String filename, boolean objectIdIsNull, boolean canSave )
    throws Exception {

  TabMapEntry mockTabMapEntry = mock( TabMapEntry.class );
  TabItem mockTabItem = mock( TabItem.class );

  Repository mockRepository = mock( Repository.class );
  DelegatingMetaStore mockMetaStore = mock( DelegatingMetaStore.class );

  spoon.rep = repIsNull ? null : mockRepository;
  spoon.metaStore = mockMetaStore;
  spoon.delegates = mock( SpoonDelegates.class );
  spoon.delegates.tabs = mock( SpoonTabsDelegate.class );
  spoon.props = mock( PropsUI.class );

  doReturn( perspectiveID ).when( spoonPerspective ).getId();

  doReturn( basicLevel ).when( log ).isBasic();
  doReturn( basicLevel ).when( log ).isDetailed();
  doReturn( mockTabMapEntry ).when( spoon.delegates.tabs ).findTabMapEntry( any() );
  doReturn( mockTabItem ).when( mockTabMapEntry ).getTabItem();
  doReturn( saveToRepository ).when( spoon ).saveToRepository( metaData, true );
  doReturn( saveXMLFile ).when( spoon ).saveXMLFile( metaData, false );
  if ( objectIdIsNull ) {
    doReturn( null ).when( metaData ).getObjectId();
  } else {
    doReturn( new ObjectId() {
      @Override public String getId() {
        return "objectId";
      }
    } ).when( metaData ).getObjectId();
  }

  //saveFile
  doReturn( filename ).when( metaData ).getFilename();
  doReturn( canSave ).when( metaData ).canSave();
  doReturn( false ).when( spoon.props ).useDBCache();
  doReturn( saveToRepository ).when( spoon ).saveToRepository( metaData );
  doReturn( saveXMLFile ).when( spoon ).save( metaData, filename, false );

  doReturn( fileType ).when( metaData ).getFileType();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:45,代码来源:SpoonTest.java

示例11: schemaSelection

import org.pentaho.di.ui.spoon.delegates.SpoonDelegates; //导入依赖的package包/类
void schemaSelection( PartitionSettings settings, Shell shell, SpoonDelegates delegates ) throws KettleException; 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:2,代码来源:MethodProcessor.java


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