Package com.amazonaws.services.s3.model.MultiObjectDeleteException

Examples of com.amazonaws.services.s3.model.MultiObjectDeleteException.DeleteError


       
        String bucketName = getConfiguration().getBucketName();
        LOG.trace("Quering whether bucket [{}] already exists...", bucketName);
       
        try {
            getS3Client().listObjects(new ListObjectsRequest(bucketName, null, null, null, 0));
            LOG.trace("Bucket [{}] already exists", bucketName);
            return;
        } catch (AmazonServiceException ase) {
            /* 404 means the bucket doesn't exist */
            if (ase.getStatusCode() != 404) {
View Full Code Here


        pendingExchanges = 0;
       
        String bucketName = getConfiguration().getBucketName();
        LOG.trace("Quering objects in bucket [{}]...", bucketName);
       
        ListObjectsRequest listObjectsRequest = new ListObjectsRequest();
        listObjectsRequest.setBucketName(bucketName);
        listObjectsRequest.setMaxKeys(getMaxMessagesPerPoll());
       
        ObjectListing listObjects = getAmazonS3Client().listObjects(listObjectsRequest);
       
        LOG.trace("Found {} objects in bucket [{}]...", listObjects.getObjectSummaries().size(), bucketName);
       
View Full Code Here

    /* (non-Javadoc)
     * @see com.amazonaws.services.s3.AmazonS3#listObjects(java.lang.String)
     */
    public ObjectListing listObjects(String bucketName)
            throws AmazonClientException, AmazonServiceException {
        return listObjects(new ListObjectsRequest(bucketName, null, null, null, null));
    }
View Full Code Here

    /* (non-Javadoc)
     * @see com.amazonaws.services.s3.AmazonS3#listObjects(java.lang.String, java.lang.String)
     */
    public ObjectListing listObjects(String bucketName, String prefix)
            throws AmazonClientException, AmazonServiceException {
        return listObjects(new ListObjectsRequest(bucketName, prefix, null, null, null));
    }
View Full Code Here

            emptyListing.setTruncated(false);

            return emptyListing;
        }

        return listObjects(new ListObjectsRequest(
                previousObjectListing.getBucketName(),
                previousObjectListing.getPrefix(),
                previousObjectListing.getNextMarker(),
                previousObjectListing.getDelimiter(),
                new Integer( previousObjectListing.getMaxKeys() ) ));
View Full Code Here

     */
    public boolean doesBucketExist(String bucketName)
        throws AmazonClientException, AmazonServiceException {

        try {
            listObjects(new ListObjectsRequest(bucketName, null, null, null, 0));

            // it exists and the current account owns it
            return true;
        } catch (AmazonServiceException ase) {
            switch (ase.getStatusCode()) {
View Full Code Here

            emptyListing.setTruncated(false);

            return emptyListing;
        }

        return listVersions(new ListVersionsRequest(
                previousVersionListing.getBucketName(),
                previousVersionListing.getPrefix(),
                previousVersionListing.getNextKeyMarker(),
                previousVersionListing.getNextVersionIdMarker(),
                previousVersionListing.getDelimiter(),
View Full Code Here

        @Override
        public void startElement(String uri, String name, String qName, Attributes attrs) {
            if ( name.equals("Deleted") ) {
                deletedObject = new DeletedObject();
            } else if ( name.equals("Error") ) {
                error = new DeleteError();
            } else if ( name.equals("Key") ) {
            } else if ( name.equals("VersionId") ) {
            } else if ( name.equals("Code") ) {
            } else if ( name.equals("Message") ) {
            } else if ( name.equals("DeleteMarker") ) {
View Full Code Here

        @Override
        public void startElement(String uri, String name, String qName, Attributes attrs) {
            if ( name.equals("Deleted") ) {
                deletedObject = new DeletedObject();
            } else if ( name.equals("Error") ) {
                error = new DeleteError();
            } else if ( name.equals("Key") ) {
            } else if ( name.equals("VersionId") ) {
            } else if ( name.equals("Code") ) {
            } else if ( name.equals("Message") ) {
            } else if ( name.equals("DeleteMarker") ) {
View Full Code Here

        @Override
        public void startElement(String uri, String name, String qName, Attributes attrs) {
            if ( name.equals("Deleted") ) {
                deletedObject = new DeletedObject();
            } else if ( name.equals("Error") ) {
                error = new DeleteError();
            } else if ( name.equals("Key") ) {
            } else if ( name.equals("VersionId") ) {
            } else if ( name.equals("Code") ) {
            } else if ( name.equals("Message") ) {
            } else if ( name.equals("DeleteMarker") ) {
View Full Code Here

TOP

Related Classes of com.amazonaws.services.s3.model.MultiObjectDeleteException.DeleteError

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.