Examples of deleteObject()


Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

        resp.setStatus(200);

        AWSCredentials myCredentials = new BasicAWSCredentials(AWS_PUBLIC_KEY, AWS_SECRET_KEY);
        AmazonS3 s3Client = new AmazonS3Client(myCredentials);
        s3Client.deleteObject(bucket, key);
    }

    // Called by the main POST request handler if Fine Uploader has asked for an item to be signed.  The item may be a
    // policy document or a string that represents multipart upload request headers.
    private void handleSignatureRequest(HttpServletRequest req, HttpServletResponse resp) throws IOException
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

        assert isNotBlank(bucketName);
        assert isNotBlank(key);

        final AmazonS3 client = acquireClient(clientOptions);

        client.deleteObject(bucketName, key);

    }

    public static void deleteDirectory(final ClientOptions clientOptions,
            final String bucketName, final String directoryName) {
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

        final List<S3ObjectSummary> objects = listDirectory(bucketName,
                directoryName, client);

        for (final S3ObjectSummary object : objects) {

            client.deleteObject(bucketName, object.getKey());

        }

        client.deleteObject(bucketName, directoryName);
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

            client.deleteObject(bucketName, object.getKey());

        }

        client.deleteObject(bucketName, directoryName);

    }

    public static boolean canConnect(final ClientOptions clientOptions) {
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

            final ObjectMetadata metadata = new ObjectMetadata();
            metadata.setContentLength(fileContent.length());

            client.putObject(bucketName, key, inputStream, metadata);
            client.deleteObject(bucketName, key);

            return true;

        } catch (AmazonClientException e) {
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

            getLog().info(logPrefix + "Renaming: "
                + "s3://" + targetRepository.getBucketName() + "/" + sourceBucketKey
                + " => s3://" + targetRepository.getBucketName() + "/" + targetBucketKey);
            if (!doNotUpload) {
                s3Session.copyObject(targetBucket, sourceBucketKey, targetBucket, targetBucketKey);
                s3Session.deleteObject(targetBucket, sourceBucketKey);
            }
        }
    }

    private static String toBucketKey(S3RepositoryPath target, String repoRelativePath) {
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

            getLog().info(logPrefix + "Renaming: "
                + "s3://" + targetRepository.getBucketName() + "/" + sourceBucketKey
                + " => s3://" + targetRepository.getBucketName() + "/" + targetBucketKey);
            if (!doNotUpload) {
                s3Session.copyObject(targetBucket, sourceBucketKey, targetBucket, targetBucketKey);
                s3Session.deleteObject(targetBucket, sourceBucketKey);
            }
        }
    }

    private static String toBucketKey(S3RepositoryPath target, String repoRelativePath) {
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3.deleteObject()

        Properties prop = readConfig(DEFAULT_CONFIG_FILE);
        AmazonS3 s3service = openService(prop);
        ObjectListing prevObjectListing = s3service.listObjects(bucketName);
        while (true) {
            for (S3ObjectSummary s3ObjSumm : prevObjectListing.getObjectSummaries()) {
                s3service.deleteObject(bucketName, s3ObjSumm.getKey());
            }
            if (!prevObjectListing.isTruncated()) {
                break;
            }
            prevObjectListing = s3service.listNextBatchOfObjects(prevObjectListing);
View Full Code Here

Examples of com.amazonaws.services.s3.AmazonS3Client.deleteObject()

        resp.setStatus(200);

        AWSCredentials myCredentials = new BasicAWSCredentials(AWS_PUBLIC_KEY, AWS_SECRET_KEY);
        AmazonS3 s3Client = new AmazonS3Client(myCredentials);
        s3Client.deleteObject(bucket, key);
    }

    // Called by the main POST request handler if Fine Uploader has asked for an item to be signed.  The item may be a
    // policy document or a string that represents multipart upload request headers.
    private void handleSignatureRequest(HttpServletRequest req, HttpServletResponse resp) throws IOException
View Full Code Here

Examples of com.cloud.bridge.service.S3BucketAdapter.deleteObject()

          // -> first get a list of all the uploaded files and delete one by one
          S3MultipartPart[] parts = uploadDao.getParts( uploadId, 10000, 0 );
          for( int i=0; i < parts.length; i++ )
          {   
              bucketAdapter.deleteObject( tupleBucketHost.getSecond(), ServiceProvider.getInstance().getMultipartDir(), parts[i].getPath());
          }
         
          uploadDao.deleteUpload( uploadId );
          return 204;
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.