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

项目:ibm-cos-sdk-java    文件:BucketConfigurationXmlFactory.java   
/**
 * Converts the specified logging configuration into an XML byte array.
 *
 * @param loggingConfiguration
 *            The configuration to convert.
 *
 * @return The XML byte array representation.
 */
public byte[] convertToXmlByteArray(BucketLoggingConfiguration loggingConfiguration) {
    // Default log file prefix to the empty string if none is specified
    String logFilePrefix = loggingConfiguration.getLogFilePrefix();
    if (logFilePrefix == null)
        logFilePrefix = "";

    XmlWriter xml = new XmlWriter();
    xml.start("BucketLoggingStatus", "xmlns", Constants.XML_NAMESPACE);
    if (loggingConfiguration.isLoggingEnabled()) {
        xml.start("LoggingEnabled");
        xml.start("TargetBucket").value(loggingConfiguration.getDestinationBucketName()).end();
        xml.start("TargetPrefix").value(loggingConfiguration.getLogFilePrefix()).end();
        xml.end();
    }
    xml.end();

    return xml.getBytes();
}
项目:s3proxy    文件:AwsSdkTest.java   
@Test
public void testUnknownParameter() throws Exception {
    try {
        client.setBucketLoggingConfiguration(
                new SetBucketLoggingConfigurationRequest(
                        containerName, new BucketLoggingConfiguration()));
        Fail.failBecauseExceptionWasNotThrown(AmazonS3Exception.class);
    } catch (AmazonS3Exception e) {
        assertThat(e.getErrorCode()).isEqualTo("NotImplemented");
    }
}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    return delegate.getBucketLoggingConfiguration(bucketName);
}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(GetBucketLoggingConfigurationRequest getBucketLoggingConfigurationRequest) throws AmazonClientException, AmazonServiceException {
    return delegate.getBucketLoggingConfiguration(getBucketLoggingConfigurationRequest);
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:syndesis    文件:AmazonS3ClientMock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:connectors    文件:AmazonS3ClientMock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws SdkClientException, AmazonServiceException {
  return call(() -> getDelegate().getBucketLoggingConfiguration(bucketName));
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(GetBucketLoggingConfigurationRequest getBucketLoggingConfigurationRequest) throws SdkClientException, AmazonServiceException {
  return call(() -> getDelegate().getBucketLoggingConfiguration(getBucketLoggingConfigurationRequest));
}
项目:Camel    文件:AmazonS3ClientMock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException, AmazonServiceException {
    throw new UnsupportedOperationException();
}
项目:presto    文件:MockAmazonS3.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName)
        throws AmazonClientException
{
    return null;
}
项目:Scribengin    文件:AmazonS3Mock.java   
@Override
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName) throws AmazonClientException,
    AmazonServiceException {
  // TODO Auto-generated method stub
  return null;
}