Package org.pentaho.platform.api.repository2.unified

Examples of org.pentaho.platform.api.repository2.unified.RepositoryFile


    return nodeToFile( session, pentahoJcrConstants, pathConversionHelper, lockHelper, node, false, null );
  }

  private static RepositoryFile getRootFolder( final Session session ) throws RepositoryException {
    Node node = session.getRootNode();
    RepositoryFile file =
        new RepositoryFile.Builder( node.getIdentifier(), "" ).folder( true ).versioned( false ).path( //$NON-NLS-1$
            JcrStringHelper.pathDecode( node.getPath() ) ).build();
    return file;
  }
View Full Code Here


      lockOwner = lockHelper.getLockOwner( session, pentahoJcrConstants, lock );
      lockDate = lockHelper.getLockDate( session, pentahoJcrConstants, lock );
      lockMessage = lockHelper.getLockMessage( session, pentahoJcrConstants, lock );
    }

    RepositoryFile file =
        new RepositoryFile.Builder( id, name ).createdDate( created ).creatorId( creatorId ).lastModificationDate(
            lastModified ).folder( folder ).versioned( versioned ).path( path ).versionId( versionId ).fileSize(
            fileSize ).locked( locked ).lockDate( lockDate ).hidden( hidden ).lockMessage( lockMessage ).lockOwner(
            lockOwner ).title( title ).description( description ).locale( pentahoLocale.toString() )
            .localePropertiesMap( localePropertiesMap ).build();
View Full Code Here

    }

    while ( nodeIterator.hasNext() ) {
      Node node = nodeIterator.nextNode();
      if ( isSupportedNodeType( pentahoJcrConstants, node ) ) {
        RepositoryFile file = nodeToFile( session, pentahoJcrConstants, pathConversionHelper, lockHelper, node );
        if ( !repositoryRequest.isShowHidden() ) {
          if ( !file.isHidden() ) {
            children.add( file );
          }
        } else {
          children.add( file );
        }
View Full Code Here

      final PentahoJcrConstants pentahoJcrConstants, final IPathConversionHelper pathConversionHelper,
      final ILockHelper lockHelper, final Node fileNode, final int depth, final String childNodeFilter,
      final boolean showHidden, IRepositoryAccessVoterManager accessVoterManager,
      RepositoryRequest.FILES_TYPE_FILTER types, MutableBoolean foundFiltered ) throws RepositoryException {

    RepositoryFile rootFile =
        nodeToFile( session, pentahoJcrConstants, pathConversionHelper, lockHelper, fileNode, false, null );
    if ( ( !showHidden && rootFile.isHidden() )
        || ( !accessVoterManager.hasAccess( rootFile, RepositoryFilePermission.READ, JcrRepositoryFileAclUtils.getAcl(
            session, pentahoJcrConstants, rootFile.getId() ), PentahoSessionHolder.getSession() ) ) ) {
      return null;
    }
    List<RepositoryFileTree> children;
    HashSet<Node> childrenFolderSet;
    // if depth is neither negative (indicating unlimited depth) nor positive (indicating at least one more level
View Full Code Here

      final PentahoJcrConstants pentahoJcrConstants, final IPathConversionHelper pathConversionHelper,
      final String childNodeFilter, final ILockHelper lockHelper, final int depth, final boolean showHidden,
      final IRepositoryAccessVoterManager accessVoterManager, RepositoryRequest.FILES_TYPE_FILTER types,
      MutableBoolean foundFiltered, boolean isRootFiltered ) throws RepositoryException {

    RepositoryFile file = nodeToFile( session, pentahoJcrConstants, pathConversionHelper, lockHelper, childNode );
    if ( isSupportedNodeType( pentahoJcrConstants, childNode )
        && ( accessVoterManager.hasAccess( file, RepositoryFilePermission.READ, JcrRepositoryFileAclUtils.getAcl(
            session, pentahoJcrConstants, file.getId() ), PentahoSessionHolder.getSession() ) ) ) {
      MutableBoolean foundFilteredAtomic = new MutableBoolean( !isPentahoFolder( pentahoJcrConstants, childNode ) );
      RepositoryFileTree repositoryFileTree =
          getTreeByNode( session, pentahoJcrConstants, pathConversionHelper, lockHelper, childNode, depth - 1,
              childNodeFilter, showHidden, accessVoterManager, types, foundFilteredAtomic );
      if ( repositoryFileTree != null && ( foundFilteredAtomic.booleanValue() || isRootFiltered ) ) {
View Full Code Here

    return data;
  }

  public RepositoryFileDto getFile( String path ) {
    validateEtcReadAccess( path );
    RepositoryFile file = repo.getFile( path );
    return file != null ? repositoryFileAdapter.marshal( file ) : null;
  }
View Full Code Here

    RepositoryFile file = repo.getFile( path );
    return file != null ? repositoryFileAdapter.marshal( file ) : null;
  }

  public RepositoryFileDto getFileById( String fileId ) {
    RepositoryFile file = repo.getFileById( fileId );
    return file != null ? repositoryFileAdapter.marshal( file ) : null;
  }
View Full Code Here

    return file != null ? repositoryFileAdapter.marshal( file ) : null;
  }

  @Override
  public RepositoryFileDto getFile( String path, boolean loadLocaleMaps, PentahoLocale locale ) {
    RepositoryFile file = this.repo.getFile( path, loadLocaleMaps, locale );
    return file != null ? this.repositoryFileAdapter.marshal( file ) : null;
  }
View Full Code Here

    return file != null ? this.repositoryFileAdapter.marshal( file ) : null;
  }

  @Override
  public RepositoryFileDto getFileById( String fileId, boolean loadLocaleMaps, PentahoLocale locale ) {
    RepositoryFile file = this.repo.getFileById( fileId, loadLocaleMaps, locale );
    return file != null ? this.repositoryFileAdapter.marshal( file ) : null;
  }
View Full Code Here

    }
    return aceDtos;
  }

  public RepositoryFileDto createFolder( String parentFolderId, RepositoryFileDto file, String versionMessage ) {
    RepositoryFile newFile =
        repo.createFolder( parentFolderId, repositoryFileAdapter.unmarshal( file ), versionMessage );
    return newFile != null ? repositoryFileAdapter.marshal( newFile ) : null;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.repository2.unified.RepositoryFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.