Package com.google.appengine.api.blobstore

Examples of com.google.appengine.api.blobstore.BlobInfoFactory


    return BlobstoreServiceFactory.getBlobstoreService();
  }

  @Provides
  BlobInfoFactory provideBlobInfoFactory() {
    return new BlobInfoFactory();
  }
View Full Code Here


      candidateKey = FileServiceFactory.getFileService()
          .getBlobKey(new AppEngineFile(keyOrFilePath));
    } else {
      candidateKey = new BlobKey(keyOrFilePath);
    }
    if (new BlobInfoFactory().loadBlobInfo(candidateKey) != null) {
      return candidateKey;
    } else {
      throw new IllegalArgumentException(
          "Blob " + candidateKey + " does not exist: " + keyOrFilePath);
    }
View Full Code Here

  private static class DeleteBlobsStartingWith
      extends Job2<Void, Predicate<BlobInfo>, BlobKey> {
    private static final long serialVersionUID = 832681572879957125L;

    @Override public Value<Void> run(Predicate<BlobInfo> predicate, BlobKey startKey) {
      Iterator<BlobInfo> infos = new BlobInfoFactory().queryBlobInfosAfter(startKey);
      ImmutableList.Builder<BlobKey> toDelete = ImmutableList.builder();
      for (int i = 0; i < MAX_BLOBINFOS_SCANNED_PER_TASK && infos.hasNext(); i++) {
        BlobInfo info = infos.next();
        if (predicate.apply(info)) {
          toDelete.add(info.getBlobKey());
View Full Code Here

// ------------------------ IMPLEMENTING METHODS ------------------------

  @Override
  public List<? extends InputReader<byte[]>> createReaders() {
    long blobSize = new BlobInfoFactory().loadBlobInfo(new BlobKey(blobKey)).getSize();
    return split(blobKey, blobSize, shardCount);
  }
View Full Code Here

    for (int i = 0; i < RECORDS_COUNT; i++) {
      writeChannel.write(ByteBuffer.wrap(RECORD.getBytes()));
    }
    writeChannel.closeFinally();
    blobKey = fileService.getBlobKey(blobFile);
    blobSize = new BlobInfoFactory().loadBlobInfo(blobKey).getSize();
  }
View Full Code Here

     * </code></pre>
     * @param selfKey the blob key to get information from
     * @return an instance of <code>BlobInfo</code>
     */
    public static BlobInfo getInfo(BlobKey selfKey) {
        return new BlobInfoFactory().loadBlobInfo(selfKey);
    }
View Full Code Here

     * @param blobstore the blobstore service
     * @param c the closure passed to the collect method
     * @return a List of BlobInfos
     */
    public static List<BlobInfo> collect(BlobstoreService blobstore, Closure<BlobInfo> c) {
        return DefaultGroovyMethods.collect(new BlobInfoFactory().queryBlobInfos(), c);
    }
View Full Code Here

     * @param blobstore the blobstore service
     * @param c the closure passed to the each method
     * @return an iterator over BlobInfos
     */
    public static Iterator<BlobInfo> each(BlobstoreService blobstore, Closure<BlobInfo> c) {
        return DefaultGroovyMethods.each(new BlobInfoFactory().queryBlobInfos(), c);
    }
View Full Code Here

    String width = req.getParameter("width");
    String height = req.getParameter("height");
    String jsonRet = null;

    if (width == null) { // first time
      BlobInfo info = new BlobInfoFactory().loadBlobInfo(blobKey);

      ImagesService imagesService = ImagesServiceFactory
          .getImagesService();

      // Try to fetch image data
View Full Code Here

    throws IOException {
        BlobKey blobKey = new BlobKey(req.getParameter("blob-key"));
       
        Iterator<BlobInfo> iterator = null;
       
        iterator = new BlobInfoFactory().queryBlobInfos();
        while ( iterator.hasNext())
        {
          BlobInfo bi = iterator.next();
          //System.out.println( bi.getFilename() +":" + bi.getBlobKey());
        }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.blobstore.BlobInfoFactory

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.