Package org.pentaho.platform.repository2.unified.jcr

Examples of org.pentaho.platform.repository2.unified.jcr.RepositoryFileProxyFactory


  }

  public long getLastModifiedDate(final FileName file) throws FileSystemException
  {
    final String[] fileName = computeFileNames(file);
    final RepositoryFileTreeDto fileInfo = lookupNode(fileName);
    if (fileInfo == null)
    {
      throw new FileSystemException(FILE_NOT_FOUND, file);
    }
    final RepositoryFileDto fileDto = fileInfo.getFile();
    if (fileDto == null)
    {
      throw new FileSystemException(BI_SERVER_NULL_OBJECT);
    }
    final Date lastModifiedDate = fileDto.getLastModifiedDate();
View Full Code Here


    if (urlService == null)
    {
      throw new NullPointerException();
    }
    final String[] fileName = computeFileNames(file);
    final RepositoryFileTreeDto fileInfo = lookupNode(fileName);
    if (fileInfo == null)
    {
      throw new FileSystemException(FILE_NOT_FOUND, file);
    }
View Full Code Here

  }

  public List<RepositoryFileTreeDto> getChildren(final FileName parent) throws FileSystemException
  {
    final String[] pathArray = computeFileNames(parent);
    final RepositoryFileTreeDto fileInfo = lookupNode(pathArray);
    if (fileInfo == null)
    {
      throw new FileSystemException(FILE_NOT_FOUND, parent);
    }

    final List<RepositoryFileTreeDto> childNodes = fileInfo.getChildren();
    return childNodes == null ? Collections.<RepositoryFileTreeDto>emptyList() : childNodes;
  }
View Full Code Here

      if (path.length == 1)
      {
        return root;
      }
    }
    RepositoryFileTreeDto element = root;
    for (final String pathSegment : path)
    {
      RepositoryFileTreeDto name = null;
      final List<RepositoryFileTreeDto> children = element.getChildren();
      if (children == null)
      {
        return null;
      }
View Full Code Here

  }

  public byte[] getData(final FileName file) throws FileSystemException
  {
    final String[] fileName = computeFileNames(file);
    final RepositoryFileTreeDto fileInfo = lookupNode(fileName);
    if (fileInfo == null)
    {
      throw new FileSystemException(FILE_NOT_FOUND, file);
    }

    final RepositoryFileDto fileDto = fileInfo.getFile();
    if (fileDto == null)
    {
      throw new IllegalStateException(BI_SERVER_NULL_OBJECT);
    }
    final String path = normalizePath(fileDto.getPath());
View Full Code Here

  {
    final List<RepositoryFileTreeDto> children = getChildren(name);
    final String[] childrenArray = new String[children.size()];
    for (int i = 0; i < children.size(); i++)
    {
      final RepositoryFileTreeDto repositoryFileTreeDto = children.get(i);
      if (repositoryFileTreeDto == null)
      {
        continue;
      }

      final RepositoryFileDto file = repositoryFileTreeDto.getFile();
      if (file == null)
      {
        throw new FileSystemException(BI_SERVER_NULL_OBJECT);
      }
      childrenArray[i] = file.getName().replaceAll("\\%", "%25").replaceAll("\\!", "%21").replaceAll("\\+", "%2B");
View Full Code Here

  }

  public String getLocalizedName(final FileName file) throws FileSystemException
  {
    final String[] fileName = computeFileNames(file);
    final RepositoryFileTreeDto fileInfo = lookupNode(fileName);
    if (fileInfo == null)
    {
      throw new FileSystemException(FILE_NOT_FOUND, file);
    }
    final RepositoryFileDto fileDto = fileInfo.getFile();
    if (fileDto == null)
    {
      throw new FileSystemException(BI_SERVER_NULL_OBJECT);
    }
    return fileDto.getTitle();
View Full Code Here

  }

  public long getContentSize(final FileName name) throws FileSystemException
  {
    final String[] pathArray = computeFileNames(name);
    final RepositoryFileTreeDto fileInfo = lookupNode(pathArray);
    if (fileInfo == null)
    {
      throw new FileSystemException(FILE_NOT_FOUND, name);
    }
    final RepositoryFileDto file = fileInfo.getFile();
    if (file == null)
    {
      throw new FileSystemException(BI_SERVER_NULL_OBJECT);
    }
    return file.getFileSize();
View Full Code Here

  if(name == null){
      throw new FileSystemException(FILE_NOT_FOUND);
    }
       
    final String[] pathArray = computeFileNames( name );
    final RepositoryFileTreeDto fileInfo = lookupNode( pathArray );
   
    if (fileInfo == null) {
      throw new FileSystemException(FILE_NOT_FOUND, name);
    }
   
    final RepositoryFileDto file = fileInfo.getFile();
   
    if ( file == null ) {
      throw new FileSystemException(BI_SERVER_NULL_OBJECT);
    }   
    return file;
View Full Code Here

    final int depth = -1;
    final String filter = "*";
    final boolean showHidden = true;

    RepositoryFileTreeDto fileTree = null;
    if ( this.doGetRootChildrenMethod == null ) {
      fileTree = this.fileRes.doGetRootTree( depth, filter, showHidden, false );
    } else {
      // apply [5.0-SNAPSHOT] backport
      try {
View Full Code Here

TOP

Related Classes of org.pentaho.platform.repository2.unified.jcr.RepositoryFileProxyFactory

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.