Package org.jets3t.service.impl.soap.axis._2006_03_01

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


        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


            while (incompleteListing) {
                AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
                Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
                String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                    Constants.SOAP_SERVICE_NAME + "ListBucket" + convertDateToString(timestamp));
                ListBucketResult result = s3SoapBinding.listBucket(
                    bucketName, prefix, priorLastKey, new Integer((int)maxListingLength),
                    delimiter, getAWSAccessKey(), timestamp, signature, null);
               
                ListEntry[] entries = result.getContents();
                S3Object[] partialObjects = new S3Object[
                   (entries == null? 0 : entries.length)];
               
                log.debug("Found " + partialObjects.length + " objects in one batch");
                for (int i = 0; entries != null && i < entries.length; i++) {
                    ListEntry entry = entries[i];
                    S3Object object = new S3Object(entry.getKey());
                    object.setLastModifiedDate(entry.getLastModified().getTime());
                    object.setETag(entry.getETag());
                    object.setContentLength(entry.getSize());
                    object.setStorageClass(entry.getStorageClass().toString());
                    object.setOwner(convertOwner(entry.getOwner()));
                    partialObjects[i] = object;
                   
                    // This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
                    priorLastKey = object.getKey();
                }
               
                objects.addAll(Arrays.asList(partialObjects));
               
                PrefixEntry[] prefixEntries = result.getCommonPrefixes();
                if (prefixEntries != null) {
                    log.debug("Found " + prefixEntries.length + " common prefixes in one batch");                   
                }
                for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
                    PrefixEntry entry = prefixEntries[i];
                    commonPrefixes.add(entry.getPrefix());
                }
               
                incompleteListing = result.isIsTruncated();
                if (incompleteListing) {
                  if (result.getNextMarker() != null) {
                    // Use NextMarker as the marker for where subsequent listing should start
                      priorLastKey = result.getNextMarker();
                  } else {
                    // Use the prior last key instead of NextMarker if it isn't available.
                  }
                    log.debug("Yet to receive complete listing of bucket contents, "
                        + "last key for prior chunk: " + priorLastKey);
View Full Code Here

            while (incompleteListing) {
                AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
                Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
                String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                    Constants.SOAP_SERVICE_NAME + "ListBucket" + convertDateToString(timestamp));
                ListBucketResult result = s3SoapBinding.listBucket(
                    bucketName, prefix, priorLastKey, new Integer((int)maxListingLength),
                    delimiter, getAWSAccessKey(), timestamp, signature, null);
               
                ListEntry[] entries = result.getContents();
                S3Object[] partialObjects = new S3Object[
                   (entries == null? 0 : entries.length)];
               
                if (log.isDebugEnabled()) {
                  log.debug("Found " + partialObjects.length + " objects in one batch");
                }
                for (int i = 0; entries != null && i < entries.length; i++) {
                    ListEntry entry = entries[i];
                    S3Object object = new S3Object(entry.getKey());
                    object.setLastModifiedDate(entry.getLastModified().getTime());
                    object.setETag(entry.getETag());
                    object.setContentLength(entry.getSize());
                    object.setStorageClass(entry.getStorageClass().toString());
                    object.setOwner(convertOwner(entry.getOwner()));
                    partialObjects[i] = object;
                   
                    // This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
                    priorLastKey = object.getKey();
                }
               
                objects.addAll(Arrays.asList(partialObjects));
               
                PrefixEntry[] prefixEntries = result.getCommonPrefixes();
                if (prefixEntries != null) {
                  if (log.isDebugEnabled()) {
                    log.debug("Found " + prefixEntries.length + " common prefixes in one batch");
                  }
                }
                for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
                    PrefixEntry entry = prefixEntries[i];
                    commonPrefixes.add(entry.getPrefix());
                }
               
                incompleteListing = result.isIsTruncated();
                if (incompleteListing) {
                  if (result.getNextMarker() != null) {
                    // Use NextMarker as the marker for where subsequent listing should start
                      priorLastKey = result.getNextMarker();
                  } else {
                    // Use the prior last key instead of NextMarker if it isn't available.
                  }
                  if (log.isDebugEnabled()) {
                      log.debug("Yet to receive complete listing of bucket contents, "
View Full Code Here

                S3Object[] partialObjects = new S3Object[
                   (entries == null? 0 : entries.length)];
               
                log.debug("Found " + partialObjects.length + " objects in one batch");
                for (int i = 0; entries != null && i < entries.length; i++) {
                    ListEntry entry = entries[i];
                    S3Object object = new S3Object(entry.getKey());
                    object.setLastModifiedDate(entry.getLastModified().getTime());
                    object.setETag(entry.getETag());
                    object.setContentLength(entry.getSize());
                    object.setStorageClass(entry.getStorageClass().toString());
                    object.setOwner(convertOwner(entry.getOwner()));
                    partialObjects[i] = object;
                   
                    // This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
                    priorLastKey = object.getKey();
                }
               
                objects.addAll(Arrays.asList(partialObjects));
               
                PrefixEntry[] prefixEntries = result.getCommonPrefixes();
                if (prefixEntries != null) {
                    log.debug("Found " + prefixEntries.length + " common prefixes in one batch");                   
                }
                for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
                    PrefixEntry entry = prefixEntries[i];
                    commonPrefixes.add(entry.getPrefix());
                }
               
                incompleteListing = result.isIsTruncated();
                if (incompleteListing) {
                  if (result.getNextMarker() != null) {
View Full Code Here

               
                if (log.isDebugEnabled()) {
                  log.debug("Found " + partialObjects.length + " objects in one batch");
                }
                for (int i = 0; entries != null && i < entries.length; i++) {
                    ListEntry entry = entries[i];
                    S3Object object = new S3Object(entry.getKey());
                    object.setLastModifiedDate(entry.getLastModified().getTime());
                    object.setETag(entry.getETag());
                    object.setContentLength(entry.getSize());
                    object.setStorageClass(entry.getStorageClass().toString());
                    object.setOwner(convertOwner(entry.getOwner()));
                    partialObjects[i] = object;
                   
                    // This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
                    priorLastKey = object.getKey();
                }
               
                objects.addAll(Arrays.asList(partialObjects));
               
                PrefixEntry[] prefixEntries = result.getCommonPrefixes();
                if (prefixEntries != null) {
                  if (log.isDebugEnabled()) {
                    log.debug("Found " + prefixEntries.length + " common prefixes in one batch");
                  }
                }
                for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
                    PrefixEntry entry = prefixEntries[i];
                    commonPrefixes.add(entry.getPrefix());
                }
               
                incompleteListing = result.isIsTruncated();
                if (incompleteListing) {
                  if (result.getNextMarker() != null) {
View Full Code Here

            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetBucketLoggingStatus" + convertDateToString(timestamp));
           
            BucketLoggingStatus loggingStatus = s3SoapBinding.getBucketLoggingStatus(               
                bucketName, getAWSAccessKey(), timestamp, signature, null);           
            LoggingSettings loggingSettings = loggingStatus.getLoggingEnabled();
            if (loggingSettings != null) {
                return new S3BucketLoggingStatus(loggingSettings.getTargetBucket(), loggingSettings.getTargetPrefix());               
            } else {
                return new S3BucketLoggingStatus();
            }
        } catch (RuntimeException e) {
            throw e;
View Full Code Here

            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "SetBucketLoggingStatus" + convertDateToString(timestamp));
           
            LoggingSettings loggingSettings = null;
            if (status.isLoggingEnabled()) {
                loggingSettings = new LoggingSettings(status.getTargetBucketName(), status.getLogfilePrefix());               
            }
           
            s3SoapBinding.setBucketLoggingStatus(
                bucketName, getAWSAccessKey(), timestamp, signature, null,
                new BucketLoggingStatus(loggingSettings));
View Full Code Here

            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "GetBucketLoggingStatus" + convertDateToString(timestamp));
           
            BucketLoggingStatus loggingStatus = s3SoapBinding.getBucketLoggingStatus(               
                bucketName, getAWSAccessKey(), timestamp, signature, null);           
            LoggingSettings loggingSettings = loggingStatus.getLoggingEnabled();
            if (loggingSettings != null) {
                return new S3BucketLoggingStatus(loggingSettings.getTargetBucket(), loggingSettings.getTargetPrefix());               
            } else {
                return new S3BucketLoggingStatus();
            }
        } catch (RuntimeException e) {
            throw e;
View Full Code Here

            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "SetBucketLoggingStatus" + convertDateToString(timestamp));
           
            LoggingSettings loggingSettings = null;
            if (status.isLoggingEnabled()) {
                loggingSettings = new LoggingSettings(
                    status.getTargetBucketName(), status.getLogfilePrefix(), new Grant[] {});               
            }
           
            s3SoapBinding.setBucketLoggingStatus(
                bucketName, getAWSAccessKey(), timestamp, signature, null,
View Full Code Here

            AmazonS3SoapBindingStub s3SoapBinding = getSoapBinding();
            Calendar timestamp = getTimeStamp( System.currentTimeMillis() );
            String signature = ServiceUtils.signWithHmacSha1(getAWSSecretKey(),
                Constants.SOAP_SERVICE_NAME + "CopyObject" + convertDateToString(timestamp));
           
            MetadataDirective metadataDirective = null;
            MetadataEntry[] metadata = null;
           
            if (destinationMetadata != null) {
                metadataDirective = MetadataDirective.REPLACE;
                metadata = convertMetadata(destinationMetadata);
View Full Code Here

TOP

Related Classes of org.jets3t.service.impl.soap.axis._2006_03_01.AmazonS3SoapBindingStub

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.