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

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

java 1次浏览

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

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

示例1: areAnyRepositoryObjectsLocked

点赞 3

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
private boolean areAnyRepositoryObjectsLocked( DropEvent event, UIRepositoryObjects repositoryObjects )
  throws KettleException {
  for ( UIRepositoryObject ro : repositoryObjects ) {
    if ( ro instanceof ILockObject ) {
      final UIRepositoryContent contentToLock = (UIRepositoryContent) ro;
      if ( ( (ILockObject) contentToLock ).isLocked() ) {
        // Content is locked, move is not allowed.
        event.setAccepted( false );
        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, "BrowseController.FolderMoveNotAllowed" ) ); //$NON-NLS-1$
        messageBox.open();
        return true;
      }
    }
  }
  return false;
}
 

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

示例2: testDelete

点赞 3

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
@Test
public void testDelete() throws Exception {
  UIRepositoryDirectories mockUIRepositoryDirectories = mock( UIRepositoryDirectories.class );
  when( mockUIRepositoryDirectories.contains( uiRepDir ) ).thenReturn( true );
  when( mockParent.getChildren() ).thenReturn( mockUIRepositoryDirectories );
  UIRepositoryObjects mockUIRepositoryObjects = mock( UIRepositoryObjects.class );
  when( mockUIRepositoryObjects.contains( uiRepDir ) ).thenReturn( true );
  when( mockParent.getRepositoryObjects() ).thenReturn( mockUIRepositoryObjects );

  uiRepDir.delete( false );
  verify( mockRepository ).deleteRepositoryDirectory( mockRepositoryDirectory );
  verify( mockUIRepositoryDirectories, times( 1 ) ).remove( uiRepDir );
  verify( mockUIRepositoryObjects, times( 1 ) ).remove( uiRepDir );
  verify( mockParent, times( 1 ) ).refresh();

  uiPurRepDir.delete( false );
  verify( mockPurRepository ).deleteRepositoryDirectory( mockRepositoryDirectory, false );
  verify( mockUIRepositoryDirectories, times( 2 ) ).remove( uiPurRepDir );
  verify( mockUIRepositoryObjects, times( 2 ) ).remove( uiPurRepDir );
  verify( mockParent, times( 2 ) ).refresh();
}
 

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

示例3: setRepositoryDirectories

点赞 2

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
public void setRepositoryDirectories(List<UIRepositoryDirectory> selectedFolderItems) {
  List<UIRepositoryDirectory> previousVal = null;
  UIRepositoryObjects previousRepoObjects = null;
  try {
    if(repositoryDirectories != null && repositoryDirectories.size() > 0) {
      previousVal = new ArrayList<UIRepositoryDirectory>();
      previousVal.addAll(repositoryDirectories);
      previousRepoObjects = getSelectedRepoDirChildren();
    }

    // Remove children listener
    if(this.repositoryDirectories != null && this.repositoryDirectories.size() > 0){
      this.repositoryDirectories.get(0).getRepositoryObjects().removePropertyChangeListener(fileChildrenListener);
    }
      
    this.repositoryDirectories = selectedFolderItems;
    
    // Add children Listener
    if(this.repositoryDirectories != null && this.repositoryDirectories.size() > 0){
        this.repositoryDirectories.get(0).getRepositoryObjects().addPropertyChangeListener("children", fileChildrenListener);
     
    } 
  } catch (KettleException e) {
    throw new RuntimeException(e);
  }
  fireFoldersAndItemsChange(previousVal, previousRepoObjects);
}
 

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

示例4: getSelectedRepoDirChildren

点赞 2

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
public UIRepositoryObjects getSelectedRepoDirChildren() {
  UIRepositoryObjects repoObjects = null;
  if (selectedFolderItems != null && selectedFolderItems.size() > 0) {
    try {
      repoObjects = repositoryDirectories.get(0).getRepositoryObjects();
    } catch (KettleException e) {
      // convert to runtime exception so it bubbles up through the UI
      throw new RuntimeException(e);
    }
  }
  return repoObjects;
}
 

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

示例5: setRepositoryDirectories

点赞 2

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
public void setRepositoryDirectories( List<UIRepositoryDirectory> selectedFolderItems ) {
  List<UIRepositoryDirectory> previousVal = null;
  UIRepositoryObjects previousRepoObjects = null;
  try {
    if ( repositoryDirectories != null && repositoryDirectories.size() > 0 ) {
      previousVal = new ArrayList<UIRepositoryDirectory>();
      previousVal.addAll( repositoryDirectories );
      previousRepoObjects = getSelectedRepoDirChildren();
    }

    // Remove children listener
    if ( this.repositoryDirectories != null && this.repositoryDirectories.size() > 0 ) {
      this.repositoryDirectories.get( 0 ).getRepositoryObjects().removePropertyChangeListener( fileChildrenListener );
    }

    this.repositoryDirectories = selectedFolderItems;

    // Add children Listener
    if ( this.repositoryDirectories != null && this.repositoryDirectories.size() > 0 ) {
      this.repositoryDirectories.get( 0 ).getRepositoryObjects().addPropertyChangeListener( "children",
          fileChildrenListener );

    }
  } catch ( KettleException e ) {
    if ( mainController == null || !mainController.handleLostRepository( e ) ) {
      throw new RuntimeException( e );
    }
  }
  fireFoldersAndItemsChange( previousVal, previousRepoObjects );
}
 

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

示例6: getSelectedRepoDirChildren

点赞 2

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
public UIRepositoryObjects getSelectedRepoDirChildren() {
  UIRepositoryObjects repoObjects = null;
  if ( selectedFolderItems != null && selectedFolderItems.size() > 0 ) {
    try {
      repoObjects = repositoryDirectories.get( 0 ).getRepositoryObjects();
    } catch ( KettleException e ) {
      // convert to runtime exception so it bubbles up through the UI
      if ( mainController == null || !mainController.handleLostRepository( e ) ) {
        throw new RuntimeException( e );
      }
    }
  }
  return repoObjects;
}
 

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

示例7: fireFoldersAndItemsChange

点赞 2

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
private void fireFoldersAndItemsChange(List<UIRepositoryDirectory> previousValue, UIRepositoryObjects previousRepoObjects) {
  firePropertyChange("repositoryDirectories", previousValue, getRepositoryDirectories()); //$NON-NLS-1$
  firePropertyChange("selectedRepoDirChildren", previousRepoObjects, getSelectedRepoDirChildren()); //$NON-NLS-1$
}
 

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

示例8: fireFoldersAndItemsChange

点赞 2

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
private void fireFoldersAndItemsChange( List<UIRepositoryDirectory> previousValue,
    UIRepositoryObjects previousRepoObjects ) {
  firePropertyChange( "repositoryDirectories", previousValue, getRepositoryDirectories() );
  firePropertyChange( "selectedRepoDirChildren", previousRepoObjects, getSelectedRepoDirChildren() );
}
 

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

示例9: getRepositoryObjects

点赞 2

import org.pentaho.di.ui.repository.repositoryexplorer.model.UIRepositoryObjects; //导入依赖的package包/类
@Override
public UIRepositoryObjects getRepositoryObjects() throws KettleException {
  return new UIRepositoryObjects();
}
 

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


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