Java 类com.amazonaws.services.s3.model.SetBucketVersioningConfigurationRequest 实例源码

项目:alfresco-lambda-java-utils    文件:S3CleanerIntegrationTest.java   
@Test
public void testEmptyWithVersions() throws Exception
{
    // enable versioning on the bucket
    SetBucketVersioningConfigurationRequest req = new SetBucketVersioningConfigurationRequest(
                bucketName, new BucketVersioningConfiguration(BucketVersioningConfiguration.ENABLED));
    s3.setBucketVersioningConfiguration(req);

    // create some versions
    createVersionedObjects();

    // empty the bucket of it's contents but leave the bucket itself
    S3Cleaner.emptyBucket(s3, bucketName, false, offlineContext);

    // check the bucket is still present but empty
    assertTrue("Bucket '" + bucketName + "' should still be present", s3.doesBucketExistV2(bucketName));
    ObjectListing objects = s3.listObjects(bucketName);
    assertTrue("Bucket '" + bucketName + "' should be empty", objects.getObjectSummaries().isEmpty());
}
项目:ibm-cos-sdk-java    文件:AmazonS3Client.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest)
    throws SdkClientException, AmazonServiceException {
    setBucketVersioningConfigurationRequest = beforeClientExecution(setBucketVersioningConfigurationRequest);
    rejectNull(setBucketVersioningConfigurationRequest,
        "The SetBucketVersioningConfigurationRequest object must be specified when setting versioning configuration");

    String bucketName = setBucketVersioningConfigurationRequest.getBucketName();
    BucketVersioningConfiguration versioningConfiguration = setBucketVersioningConfigurationRequest.getVersioningConfiguration();

    rejectNull(bucketName,
        "The bucket name parameter must be specified when setting versioning configuration");
    rejectNull(versioningConfiguration,
        "The bucket versioning parameter must be specified when setting versioning configuration");
    if (versioningConfiguration.isMfaDeleteEnabled() != null) {
        rejectNull(setBucketVersioningConfigurationRequest.getMfa(),
            "The MFA parameter must be specified when changing MFA Delete status in the versioning configuration");
    }

    Request<SetBucketVersioningConfigurationRequest> request = createRequest(bucketName, null, setBucketVersioningConfigurationRequest, HttpMethodName.PUT);
    request.addParameter("versioning", null);

    if (versioningConfiguration.isMfaDeleteEnabled() != null) {
        if (setBucketVersioningConfigurationRequest.getMfa() != null) {
            populateRequestWithMfaDetails(request, setBucketVersioningConfigurationRequest.getMfa());
        }
    }

    byte[] bytes = bucketConfigurationXmlFactory.convertToXmlByteArray(versioningConfiguration);
    request.setContent(new ByteArrayInputStream(bytes));

    invoke(request, voidResponseHandler, bucketName, null);
}
项目:Scribengin    文件:AmazonS3Mock.java   
@Override
public void setBucketVersioningConfiguration(
    SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException,
    AmazonServiceException {
  // TODO Auto-generated method stub

}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    delegate.setBucketVersioningConfiguration(setBucketVersioningConfigurationRequest);
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws SdkClientException, AmazonServiceException {
  run(() -> getDelegate().setBucketVersioningConfiguration(setBucketVersioningConfigurationRequest));
}
项目:Camel    文件:AmazonS3ClientMock.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:presto    文件:MockAmazonS3.java   
@Override
public void setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest setBucketVersioningConfigurationRequest)
        throws AmazonClientException
{
}