Package org.pentaho.platform.repository2.unified.webservices

Examples of org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto


    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.isHidden();
  }
View Full Code Here


    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);
    }
    fileDto.setDescription(description);
  }
View Full Code Here

    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.getDescription();
  }
View Full Code Here

    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();
    if (lastModifiedDate == null)
    {
      logger.error("Repository returned <null> for last-modified-date on file: " + file);
      return -1;
    }
View Full Code Here

        return null;
      }

      for (final RepositoryFileTreeDto child : children)
      {
        final RepositoryFileDto file = child.getFile();
        if (file == null)
        {
          throw new FileSystemException(BI_SERVER_NULL_OBJECT);
        }
        if (pathSegment.equals(file.getName()))
        {
          name = child;
          break;
        }
      }
View Full Code Here

    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());
    String urlPath = path;
    try{urlPath = URLEncoder.encodeUTF8(path).replaceAll("\\!", "%21").replaceAll("\\+", "%2B");}catch(Exception ex){}//tcb
    final String service = MessageFormat.format(DOWNLOAD_SERVICE, urlPath);

    return client.resource(url + service).accept(MediaType.APPLICATION_XML_TYPE).get(byte[].class);
View Full Code Here

      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");
    }
    return childrenArray;
  }
View Full Code Here

    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

    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

  @Override
  public boolean delete( FileName name ) throws FileSystemException {

    boolean success = false;
       
    final RepositoryFileDto file = getFile( name );
   
    try {  
     
      final WebResource resource = client.resource( url + DELETE_FILE_OR_FOLDER );
        final ClientResponse response = resource.put( ClientResponse.class, file.getId() );
        
        if ( response != null && response.getStatus() == Response.Status.OK.getStatusCode() ) {
          refresh();
            success = true;
        } else {
View Full Code Here

TOP

Related Classes of org.pentaho.platform.repository2.unified.webservices.RepositoryFileDto

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.