當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。