Examples of ListAllMyBucketsResult


Examples of com.amazon.s3.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

Examples of com.amazon.s3.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

Examples of com.amazon.s3.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());
      }

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

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

      /* Create the bucket if it doesn't yet exist */
      boolean bucketFound = false;

      /* First, create the bucket if it doesn't yet exist */
      ListOperation listOperation = new ListOperation(null, null);
      ListAllMyBucketsResult list = listOperation.getBucketList();

      for (ListAllMyBucketsEntry bucket : list.getBuckets())
      {
        if (getBucketName().equals(bucket.getName()))
        {
          bucketFound = true;
          break;
View Full Code Here

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

    {
   
      Log.info("Bucket List\n");
     
      /* Get the list of files from S3 */
      ListAllMyBucketsResult listResult = null;
 
      /* Get a page of results */
      listResult = getBucketList();
     
      long bucketCount = 0;
     
      /* Process this list of keys */
      for (ListAllMyBucketsEntry listEntry : listResult.getBuckets())
      {
        String bucket = listEntry.getName();
        Log.info(this.df_.format(listEntry.getCreationDate().getTime()) + " - " + bucket + "\n");       
        bucketCount++;
      }
     
     
      Log.info(String.format("total: %d\n", bucketCount));
     
    }
    else
    {
     
      /* If a bucket is specified, then list the files in the bucket */
      String marker = null;
     
      /* Get the list of files from S3 */
      ListBucketResult listResult = null;
     
      /* This do while loop deals with the paging of s3 lists */
      do
      {
        /* Get a page of results */
        listResult = getBucketObjectList(marker, getBucketName(), getPrefixName(), MAX_KEYS_PER_LIST);
       
        if (listResult.getContents() != null)
        {
          /* Process this list of keys */
          for (ListEntry listEntry : listResult.getContents())
          {
            marker = listEntry.getKey();
            processListEntry(listEntry);
           
          }
         
        }
           
      }
      while(listResult.isIsTruncated());
     
     
      /* Now that each object has been processed, dump the results to the screen */
      Iterator keyIterator = this.archives_.keySet().iterator();
      while (keyIterator.hasNext())
View Full Code Here

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

  public ListAllMyBucketsResult getBucketList() throws Exception
  {
    Access access = new Access();
   
    /* Get the list of files from S3 */
    ListAllMyBucketsResult listResult = null;
   
    /* Get a page of results */
    listResult = getS3Port().listAllMyBuckets(
                      access.getAccessKey(),
                      access.getAccessCalendar(),
View Full Code Here

Examples of org.jets3t.service.impl.soap.axis._2006_03_01.ListAllMyBucketsResult

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );           
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "ListAllMyBuckets" + convertDateToString(timestamp));
            ListAllMyBucketsResult result = s3SoapBinding.listAllMyBuckets(
                getAWSAccessKey(), timestamp, signature);

            ListAllMyBucketsEntry[] entries = result.getBuckets();           
            buckets = new S3Bucket[entries.length];
            int index = 0;
            for (int i = 0; i < entries.length; i++) {
                ListAllMyBucketsEntry entry = (ListAllMyBucketsEntry) entries[i];
                S3Bucket bucket = new S3Bucket();
View Full Code Here

Examples of org.jets3t.service.impl.soap.axis._2006_03_01.ListAllMyBucketsResult

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );           
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "ListAllMyBuckets" + convertDateToString(timestamp));
            ListAllMyBucketsResult result = s3SoapBinding.listAllMyBuckets(
                getAWSAccessKey(), timestamp, signature);

            ListAllMyBucketsEntry[] entries = result.getBuckets();           
            buckets = new S3Bucket[entries.length];
            int index = 0;
            for (int i = 0; i < entries.length; i++) {
                ListAllMyBucketsEntry entry = (ListAllMyBucketsEntry) entries[i];
                S3Bucket bucket = new S3Bucket();
View Full Code Here

Examples of org.jets3t.service.impl.soap.axis._2006_03_01.ListAllMyBucketsResult

        try {
            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );           
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "ListAllMyBuckets" + convertDateToString(timestamp));
            ListAllMyBucketsResult result = s3SoapBinding.listAllMyBuckets(
                getAWSAccessKey(), timestamp, signature);

            ListAllMyBucketsEntry[] entries = result.getBuckets();           
            buckets = new S3Bucket[entries.length];
            int index = 0;
            for (int i = 0; i < entries.length; i++) {
                ListAllMyBucketsEntry entry = (ListAllMyBucketsEntry) entries[i];
                S3Bucket bucket = new S3Bucket();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.