Package com.amazonaws.services.s3.model.BucketLifecycleConfiguration

Examples of com.amazonaws.services.s3.model.BucketLifecycleConfiguration.Transition


    @Override
    protected void doUpload(S3BlobStore blobStore, String bucketName, String blobName, InputStream is, int length, boolean serverSideEncryption) throws AmazonS3Exception {
        try {
            long copied = Streams.copy(is, out);
            if (copied != length) {
                throw new AmazonS3Exception("Not all the bytes were copied");
            }
            numberOfUploadRequests++;
        } catch (IOException e) {
            throw new AmazonS3Exception(e.getMessage());
        }
    }
View Full Code Here


    @Override
    protected PartETag doUploadMultipart(S3BlobStore blobStore, String bucketName, String blobName, String uploadId, InputStream is, int length, boolean lastPart) throws AmazonS3Exception {
        try {
            long copied = Streams.copy(is, out);
            if (copied != length) {
                throw new AmazonS3Exception("Not all the bytes were copied");
            }
            return new PartETag(numberOfUploadRequests++, RandomizedTest.randomAsciiOfLength(50));
        } catch (IOException e) {
            throw new AmazonS3Exception(e.getMessage());
        }
    }
View Full Code Here

    public Bucket createBucket(CreateBucketRequest createBucketRequest) throws AmazonClientException, AmazonServiceException {
        if ("nonExistingBucket".equals(createBucketRequest.getBucketName())) {
            nonExistingBucketCreated = true;
        }
       
        Bucket bucket = new Bucket();
        bucket.setName(createBucketRequest.getBucketName());
        bucket.setCreationDate(new Date());
        bucket.setOwner(new Owner("c2efc7302b9011ba9a78a92ac5fd1cd47b61790499ab5ddf5a37c31f0638a8fc ", "Christian Mueller"));
        return bucket;
    }
View Full Code Here

    public Bucket createBucket(CreateBucketRequest createBucketRequest) throws AmazonClientException, AmazonServiceException {
        if ("nonExistingBucket".equals(createBucketRequest.getBucketName())) {
            nonExistingBucketCreated = true;
        }
       
        Bucket bucket = new Bucket();
        bucket.setName(createBucketRequest.getBucketName());
        bucket.setCreationDate(new Date());
        bucket.setOwner(new Owner("c2efc7302b9011ba9a78a92ac5fd1cd47b61790499ab5ddf5a37c31f0638a8fc ", "Christian Mueller"));
        return bucket;
    }
View Full Code Here

                rule = new Rule();
            } else if (name.equals("ID")) {
            } else if (name.equals("Prefix")) {
            } else if (name.equals("Status")) {
            } else if (name.equals("Transition")) {
                transition = new Transition();
                inTransition = true;
            } else if (name.equals("StorageClass")) {
            } else if (name.equals("Date")) {
            } else if (name.equals("Expiration")) {
            } else if (name.equals("Days")) {
View Full Code Here

            } else if (name.equals("Prefix")) {
            } else if (name.equals("Status")) {
            } else if (name.equals("Expiration")) {
                container = Container.EXPIRATION;
            } else if (name.equals("Transition")) {
                transition = new Transition();
                container = Container.TRANSITION;
            } else if (name.equals("NoncurrentVersionExpiration")) {
                container = Container.NON_CURRENT_VERSION_EXPIRATION;
            } else if (name.equals("NoncurrentVersionTransition")) {
                ncvTransition = new NoncurrentVersionTransition();
View Full Code Here

                if (name.equals("Rule")) {
                    currentRule = new Rule();
                }
            } else if (in("LifecycleConfiguration", "Rule")) {
                if (name.equals("Transition")) {
                    currentTransition = new Transition();
                } else if (name.equals("NoncurrentVersionTransition")) {
                    currentNcvTransition = new NoncurrentVersionTransition();
                }
            }
        }
View Full Code Here

            xml.start("ID").value(rule.getId()).end();
        }
        xml.start("Prefix").value(rule.getPrefix()).end();
        xml.start("Status").value(rule.getStatus()).end();

        Transition transition = rule.getTransition();
        if (transition != null) {
            xml.start("Transition");
            if (transition.getDate() != null) {
                xml.start("Date");
                xml.value(ServiceUtils.formatIso8601Date(transition.getDate()));
                xml.end();
            }
            if (transition.getDays() != -1) {
                xml.start("Days");
                xml.value(Integer.toString(transition.getDays()));
                xml.end();
            }

            xml.start("StorageClass");
            xml.value(transition.getStorageClass().toString());
            xml.end(); // <StorageClass>
            xml.end(); // </Transition>
        }

        NoncurrentVersionTransition ncvTransition =
View Full Code Here

            xml.start("ID").value(rule.getId()).end();
        }
        xml.start("Prefix").value(rule.getPrefix()).end();
        xml.start("Status").value(rule.getStatus()).end();

        Transition transition = rule.getTransition();
        if (transition != null) {
            xml.start("Transition");
            if (transition.getDate() != null) {
                xml.start("Date");
                xml.value(ServiceUtils.formatIso8601Date(transition.getDate()));
                xml.end();
            }
            if (transition.getDays() != -1) {
                xml.start("Days");
                xml.value(Integer.toString(transition.getDays()));
                xml.end();
            }

            xml.start("StorageClass");
            xml.value(transition.getStorageClass().toString());
            xml.end(); // <StorageClass>
            xml.end(); // </Transition>
        }

        if (rule.getExpirationInDays() != -1) {
View Full Code Here

                rule = new Rule();
            } else if (name.equals("ID")) {
            } else if (name.equals("Prefix")) {
            } else if (name.equals("Status")) {
            } else if (name.equals("Transition")) {
                transition = new Transition();
                inTransition = true;
            } else if (name.equals("StorageClass")) {
            } else if (name.equals("Date")) {
            } else if (name.equals("Expiration")) {
            } else if (name.equals("Days")) {
View Full Code Here

TOP

Related Classes of com.amazonaws.services.s3.model.BucketLifecycleConfiguration.Transition

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.