org.pentaho.di.repository.Repository.undeleteObject()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中org.pentaho.di.repository.Repository.undeleteObject方法的一些代码示例,展示了Repository.undeleteObject的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.undeleteObject方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:undeleteObject

Repository.undeleteObject介绍

[英]Removes he deleted flag from a repository element in the repository. If it wasn't deleted, it remains untouched.
[中]从存储库中的存储库元素中删除删除标志。如果没有被删除,它将保持不变。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void undeleteObject( RepositoryElementMetaInterface repositoryElementMetaInterface ) throws KettleException {
 getDelegate().undeleteObject( repositoryElementMetaInterface );
}

代码示例来源:origin: pentaho/pentaho-kettle

public boolean restoreSelectedObjects() {
 TreeItem[] items = wTree.getSelection();
 boolean error = false;
 for ( int i = 0; i < items.length; i++ ) {
  final RepositoryElementMetaInterface repositoryObject = objectMap.get( ConstUI.getTreePath( items[i], 0 ) );
  if ( repositoryObject != null ) {
   try {
    rep.undeleteObject( repositoryObject );
   } catch ( Exception e ) {
    new ErrorDialog(
     shell,
     BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRestoring.Title" ), BaseMessages
      .getString( PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRestoring.Message" ), e );
    error = true;
   }
  }
 }
 refreshTree();
 return !error;
}

相关文章

Repository类方法