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


Java RepositoryFileTreeDto类代码示例

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


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

示例1: checkForExistingFile

import org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto; //导入依赖的package包/类
/**
 * find a matching file/path combination by going back to server fileTree and matching name
 * @param path
 * @param name
 * @return true if file exists on path
 */
public boolean checkForExistingFile(String path, String name) {
  boolean ans = false;
  if (path == null || name == null) {
    Log.error("path ["+path+"] and name ["+name+"] cannot be null");
    return false;
  }    
  try {
    RepositoryFileTreeDto tree = fetchRepositoryFileTree(path, -1, null , false);
    if (tree != null && tree.getFile() != null && !tree.getChildren().isEmpty()) {
      for(RepositoryFileTreeDto file :tree.getChildren()){
        if (!file.getFile().isFolder()) {
          if (file.getFile().getName().equals(name)) {             
            ans = true;
            break;
          }
        }        
      }
    }

  } catch (Exception e) {
    Log.error(e.getMessage(),e);
  }
  return ans;
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:31,代码来源:ModelServerPublish.java

示例2: createSolutionTree

import org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto; //导入依赖的package包/类
/**
 * 
 * @param model
 * @param folderTreeDepth
 * @throws PublishException
 */
public void createSolutionTree(final XulDialogPublishModel dialogModel, final int folderTreeDepth) throws PublishException {
  try {

    RepositoryFileTreeDto tree = fetchRepositoryFileTree(null,folderTreeDepth, null, null);
    if (tree != null && tree.getFile() != null) {
      SolutionObject root = new SolutionObject();
      root.add(new SolutionObject(tree, folderTreeDepth));
      dialogModel.setSolutions(root);
    }

  } catch (Exception e) {
    throw new PublishException("Error building solution document", e);
  }

}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:22,代码来源:ModelServerPublish.java

示例3: SolutionObject

import org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto; //导入依赖的package包/类
public SolutionObject(RepositoryFileTreeDto reposFileTree, int maxDepth) {
  this.reposFileTree = reposFileTree;
  this.name = reposFileTree.getFile().getName();
  //.findStringProperty( CmisObject.LOCALIZEDNAME, null );
  //this.navigationService = navigationService;

  try {
    List<RepositoryFileTreeDto> children = reposFileTree.getChildren();
    if (children != null) {
      //navigationService.getDescendants(BiPlatformRepositoryClient.PLATFORMORIG, reposFileTree.findIdProperty( PropertiesBase.OBJECTID, null ), new TypesOfFileableObjects( TypesOfFileableObjects.FOLDERS ), 1, null, false, false);
      if (maxDepth == -1 || calculateDepth() < maxDepth) {
        for (RepositoryFileTreeDto obj : children) {
          if (obj.getFile().isFolder())
            add(new SolutionObject(obj, maxDepth));
        }
      }
    }
  } catch (Exception e) {
    e.printStackTrace();
  }
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:22,代码来源:SolutionObject.java

示例4: processRevisionDeletion

import org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto; //导入依赖的package包/类
private void processRevisionDeletion( PurgeUtilitySpecification purgeSpecification ) throws PurgeDeletionException {

    RepositoryRequest repositoryRequest =
        new RepositoryRequest( purgeSpecification.getPath(), true, -1, purgeSpecification.getFileFilter() );
    repositoryRequest.setTypes( FILES_TYPE_FILTER.FILES_FOLDERS );
    repositoryRequest.setIncludeMemberSet( new HashSet<String>( Arrays.asList( new String[] { "name", "id", "folder",
      "path", "versioned", "versionId", "locked" } ) ) );

    getLogger().debug( "Creating file list" );
    RepositoryFileTreeDto tree = getRepoWs().getTreeFromRequest( repositoryRequest );

    processPurgeForTree( tree, purgeSpecification );
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:UnifiedRepositoryPurgeService.java

示例5: processPurgeForTree

import org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto; //导入依赖的package包/类
private void processPurgeForTree( RepositoryFileTreeDto tree, PurgeUtilitySpecification purgeSpecification ) {

    for ( RepositoryFileTreeDto child : tree.getChildren() ) {
      try {
        if ( !child.getChildren().isEmpty() ) {
          processPurgeForTree( child, purgeSpecification );
        }
        RepositoryFileDto file = child.getFile();
        getLogger().setCurrentFilePath( file.getPath() );
        if ( file.isVersioned() ) {
          if ( purgeSpecification.isPurgeFiles() ) {
            getLogger().info( "Purge File" );
            keepNumberOfVersions( file.getId(), 1 ); // the latest version will be removed with deleteFileWithPermanentFlag
            getRepoWs().deleteFileWithPermanentFlag( file.getId(), true, "purge utility" );
          } else if ( purgeSpecification.isPurgeRevisions() ) {
            getLogger().info( "Purging Revisions" );
            deleteAllVersions( file.getId() );
          } else {
            if ( purgeSpecification.getBeforeDate() != null ) {
              getLogger().info( "Checking/purging by Revision date" );
              deleteVersionsBeforeDate( file.getId(), purgeSpecification.getBeforeDate() );
            }
            if ( purgeSpecification.getVersionCount() >= 0 ) {
              getLogger().info( "Checking/purging by number of Revisions" );
              keepNumberOfVersions( file.getId(), purgeSpecification.getVersionCount() );
            }
          }
        }
      } catch ( Exception e ) {
        getLogger().error( e );
      }
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:34,代码来源:UnifiedRepositoryPurgeService.java

示例6: getReposFileTree

import org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto; //导入依赖的package包/类
public RepositoryFileTreeDto getReposFileTree() {
  return reposFileTree;
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:4,代码来源:SolutionObject.java

示例7: setReposFileTree

import org.pentaho.platform.repository2.unified.webservices.RepositoryFileTreeDto; //导入依赖的package包/类
public void setReposFileTree(RepositoryFileTreeDto reposFileTree) {
  this.reposFileTree = reposFileTree;
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:4,代码来源:SolutionObject.java


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