Package com.amazonaws.s3.doc._2006_03_01

Examples of com.amazonaws.s3.doc._2006_03_01.ListAllMyBucketsResult


    return request;
  }
 
  public static ListAllMyBucketsResponse toListAllMyBucketsResponse(S3ListAllMyBucketsResponse engineResponse) {
    ListAllMyBucketsResponse response = new ListAllMyBucketsResponse();
    ListAllMyBucketsResult result = new ListAllMyBucketsResult();
    ListAllMyBucketsEntry[] entries = null;
   
    S3CanonicalUser ownerEngine = engineResponse.getOwner();
    CanonicalUser owner = new CanonicalUser();
    owner.setID(ownerEngine.getID());
    owner.setDisplayName(ownerEngine.getDisplayName());
    result.setOwner(owner);
    S3ListAllMyBucketsEntry[] engineEntries = engineResponse.getBuckets();
    if (engineEntries != null) {
      entries = new ListAllMyBucketsEntry[engineEntries.length];
      for(int i = 0; i < engineEntries.length; i++) {
        entries[i] = new ListAllMyBucketsEntry();
        entries[i].setName(engineEntries[i].getName());
        entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
      }

      ListAllMyBucketsList list = new ListAllMyBucketsList();
        list.setBucket(entries);
        result.setBuckets(list);
    }
    response.setListAllMyBucketsResponse(result);
    return response;
  }
View Full Code Here


        return request;
    }

    public static ListAllMyBucketsResponse toListAllMyBucketsResponse(S3ListAllMyBucketsResponse engineResponse) {
        ListAllMyBucketsResponse response = new ListAllMyBucketsResponse();
        ListAllMyBucketsResult result = new ListAllMyBucketsResult();
        ListAllMyBucketsEntry[] entries = null;

        S3CanonicalUser ownerEngine = engineResponse.getOwner();
        CanonicalUser owner = new CanonicalUser();
        owner.setID(ownerEngine.getID());
        owner.setDisplayName(ownerEngine.getDisplayName());
        result.setOwner(owner);
        S3ListAllMyBucketsEntry[] engineEntries = engineResponse.getBuckets();
        if (engineEntries != null) {
            entries = new ListAllMyBucketsEntry[engineEntries.length];
            for (int i = 0; i < engineEntries.length; i++) {
                entries[i] = new ListAllMyBucketsEntry();
                entries[i].setName(engineEntries[i].getName());
                entries[i].setCreationDate(engineEntries[i].getCreationDate());   //setTimeZone(TimeZone.getTimeZone("Z"));
            }

            ListAllMyBucketsList list = new ListAllMyBucketsList();
            list.setBucket(entries);
            result.setBuckets(list);
        }
        response.setListAllMyBucketsResponse(result);
        return response;
    }
View Full Code Here

    return request;
  }
 
  public static ListAllMyBucketsResponse toListAllMyBucketsResponse(S3ListAllMyBucketsResponse engineResponse) {
    ListAllMyBucketsResponse response = new ListAllMyBucketsResponse();
    ListAllMyBucketsResult result = new ListAllMyBucketsResult();
    ListAllMyBucketsEntry[] entries = null;
   
    S3CanonicalUser ownerEngine = engineResponse.getOwner();
    CanonicalUser owner = new CanonicalUser();
    owner.setID(ownerEngine.getID());
    owner.setDisplayName(ownerEngine.getDisplayName());
    result.setOwner(owner);
    S3ListAllMyBucketsEntry[] engineEntries = engineResponse.getBuckets();
    if (engineEntries != null) {
      entries = new ListAllMyBucketsEntry[engineEntries.length];
      for(int i = 0; i < engineEntries.length; i++) {
        entries[i] = new ListAllMyBucketsEntry();
        entries[i].setName(engineEntries[i].getName());
        entries[i].setCreationDate(engineEntries[i].getCreationDate());
      }

      ListAllMyBucketsList list = new ListAllMyBucketsList();
        list.setBucket(entries);
        result.setBuckets(list);
    }
    response.setListAllMyBucketsResponse(result);
    return response;
  }
View Full Code Here

       
        long startTime = System.currentTimeMillis();
       
       
        AmazonS3_ServiceLocator locator = new AmazonS3_ServiceLocator();
        AmazonS3SoapBindingStub binding = new AmazonS3SoapBindingStub(new URL(locator.getAmazonS3Address()), locator);
       
        result = binding.getObject(getBucketName(),
                      key,
                      false,
                      true,
                      false,
                      access.getAccessKey(),
                      access.getAccessCalendar(),
                      access.generateSignature("GetObject"),
                      null);
       
       
        long endTime = System.currentTimeMillis();
       
               
        /* Get the attachments. Note, the getAttachments() method will ONLY return the object[] on the first call.  Subsiquent calls will return null */
        Object[] attachments = binding.getAttachments();
        if (attachments.length != 1)
        {
          throw new Exception("The S3 Object returned [" + attachments.length + "] when we expected exactly 1");
        }
       
View Full Code Here

   
      long startTime = System.currentTimeMillis();
     
     
      AmazonS3_ServiceLocator locator = new AmazonS3_ServiceLocator();
      AmazonS3SoapBindingStub binding = new AmazonS3SoapBindingStub(new URL(locator.getAmazonS3Address()), locator);
      DataHandler dataHandler = new DataHandler(new SourceDataSource(null, MIMETYPE_OCTET_STREAM, new StreamSource(is)));
            binding.addAttachment(dataHandler);
     
      PutObjectResult result = binding.putObject(getBucketName(),
                            key,
                            metaData ,
                            length,
                            null,
                            storageClass,
View Full Code Here

   *******************************************************/
  public AmazonS3_PortType getS3Port() throws Exception
  {
    if (this.s3Port_ == null)
    {
      this.s3Port_ = new AmazonS3_ServiceLocator().getAmazonS3();
    }
   
    return this.s3Port_;
  }
View Full Code Here

   * to obtain the already created port.
   * @return
   *******************************************************/
  public AmazonS3_PortType createS3Port(String endpoint) throws Exception
  {
    AmazonS3_ServiceLocator loc = new AmazonS3_ServiceLocator();
    loc.setAmazonS3EndpointAddress(endpoint);
    this.s3Port_ = loc.getAmazonS3();
    return this.s3Port_;
  }
View Full Code Here

      {
       
        long startTime = System.currentTimeMillis();
       
       
        AmazonS3_ServiceLocator locator = new AmazonS3_ServiceLocator();
        AmazonS3SoapBindingStub binding = new AmazonS3SoapBindingStub(new URL(locator.getAmazonS3Address()), locator);
       
        result = binding.getObject(getBucketName(),
                      key,
                      false,
                      true,
View Full Code Here

   
   
      long startTime = System.currentTimeMillis();
     
     
      AmazonS3_ServiceLocator locator = new AmazonS3_ServiceLocator();
      AmazonS3SoapBindingStub binding = new AmazonS3SoapBindingStub(new URL(locator.getAmazonS3Address()), locator);
      DataHandler dataHandler = new DataHandler(new SourceDataSource(null, MIMETYPE_OCTET_STREAM, new StreamSource(is)));
            binding.addAttachment(dataHandler);
     
      PutObjectResult result = binding.putObject(getBucketName(),
                            key,
View Full Code Here

      arch.lastModifiedDate = timestamp;
     
      /* Given this is the first object found with this prefix, we'll use this
       * key to get it's metadata for the TAG value */
      Access access = new Access();
      GetObjectResult result = new AmazonS3_ServiceLocator().getAmazonS3().getObject(getBucketName(),
                                              key,
                                              true,
                                              false,
                                              false,
                                              access.getAccessKey(),
View Full Code Here

TOP

Related Classes of com.amazonaws.s3.doc._2006_03_01.ListAllMyBucketsResult

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.