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

项目:unitstack    文件:MockS3Test.java   
@Test
public void testEvilNonInjectableMocks_shouldReturnNormal() {
  String dirtBucket = "dirt-mudd-stuff";
  s3.isRequesterPaysEnabled(dirtBucket);

  assertNotNull(s3.setBucketAnalyticsConfiguration(new SetBucketAnalyticsConfigurationRequest()
      .withBucketName(dirtBucket).withAnalyticsConfiguration(new AnalyticsConfiguration().withId("sdf"))));
  s3.setBucketCrossOriginConfiguration(new SetBucketCrossOriginConfigurationRequest(dirtBucket, 
      new BucketCrossOriginConfiguration().withRules(new CORSRule().withId("dfsf"))));
  s3.setBucketLifecycleConfiguration(new SetBucketLifecycleConfigurationRequest(dirtBucket, 
      new BucketLifecycleConfiguration().withRules(new BucketLifecycleConfiguration.Rule())));
  s3.setBucketPolicy(new SetBucketPolicyRequest(dirtBucket, "this policy must not be clean"));
  s3.setBucketNotificationConfiguration(new SetBucketNotificationConfigurationRequest(
     dirtBucket, new BucketNotificationConfiguration()));
  s3.setBucketReplicationConfiguration(new SetBucketReplicationConfigurationRequest().withBucketName(dirtBucket)
      .withReplicationConfiguration(new BucketReplicationConfiguration()));
  s3.setBucketTaggingConfiguration(new SetBucketTaggingConfigurationRequest(dirtBucket, new BucketTaggingConfiguration().withTagSets(new TagSet())));

  assertNotNull(s3.setObjectTagging(new SetObjectTaggingRequest(dirtBucket, "sdfdsf", new ObjectTagging(new ArrayList<>()))));
  assertNotNull(s3.getObjectTagging(new GetObjectTaggingRequest(dirtBucket, "lkjlkj")));
  assertNotNull(s3.listVersions(new ListVersionsRequest().withBucketName(dirtBucket)));
}
项目:ibm-cos-sdk-java    文件:XmlResponsesSaxParser.java   
@Override
protected void doStartElement(
        String uri,
        String name,
        String qName,
        Attributes attrs) {

    if (in("ListBucketAnalyticsConfigurationsResult")) {
        if (name.equals("AnalyticsConfiguration")) {
            currentConfiguration = new AnalyticsConfiguration();
        }

    } else if (in("ListBucketAnalyticsConfigurationsResult", "AnalyticsConfiguration")) {
        if (name.equals("Filter")) {
            currentFilter = new AnalyticsFilter();
        } else if (name.equals("StorageClassAnalysis")) {
            storageClassAnalysis = new StorageClassAnalysis();
        }

    } else if (in("ListBucketAnalyticsConfigurationsResult", "AnalyticsConfiguration", "Filter")) {
        if (name.equals("And")) {
            andOperandsList = new ArrayList<AnalyticsFilterPredicate>();
        }

    } else if (in("ListBucketAnalyticsConfigurationsResult", "AnalyticsConfiguration", "StorageClassAnalysis")) {
        if (name.equals("DataExport")) {
            dataExport = new StorageClassAnalysisDataExport();
        }

    } else if (in("ListBucketAnalyticsConfigurationsResult", "AnalyticsConfiguration", "StorageClassAnalysis", "DataExport")) {
        if (name.equals("Destination")) {
            destination = new AnalyticsExportDestination();
        }

    } else if (in("ListBucketAnalyticsConfigurationsResult", "AnalyticsConfiguration", "StorageClassAnalysis", "DataExport", "Destination")) {
        if (name.equals("S3BucketDestination")) {
            s3BucketDestination = new AnalyticsS3BucketDestination();
        }
    }
}
项目:ibm-cos-sdk-java    文件:SetBucketAnalyticsConfigurationRequest.java   
public SetBucketAnalyticsConfigurationRequest(String bucketName, AnalyticsConfiguration analyticsConfiguration) {
    this.bucketName = bucketName;
    this.analyticsConfiguration = analyticsConfiguration;
}
项目:ibm-cos-sdk-java    文件:SetBucketAnalyticsConfigurationRequest.java   
/**
 * Returns the {@link AnalyticsConfiguration} object.
 */
public AnalyticsConfiguration getAnalyticsConfiguration() {
    return analyticsConfiguration;
}
项目:ibm-cos-sdk-java    文件:SetBucketAnalyticsConfigurationRequest.java   
/**
 * Sets the {@link AnalyticsConfiguration} object.
 */
public void setAnalyticsConfiguration(AnalyticsConfiguration analyticsConfiguration) {
    this.analyticsConfiguration = analyticsConfiguration;
}
项目:ibm-cos-sdk-java    文件:SetBucketAnalyticsConfigurationRequest.java   
/**
 * Sets the {@link AnalyticsConfiguration} object and
 * returns this object for method chaining.
 */
public SetBucketAnalyticsConfigurationRequest withAnalyticsConfiguration(AnalyticsConfiguration analyticsConfiguration) {
    setAnalyticsConfiguration(analyticsConfiguration);
    return this;
}
项目:ibm-cos-sdk-java    文件:BucketConfigurationXmlFactory.java   
/**
 * Converts the specified {@link com.amazonaws.services.s3.model.analytics.AnalyticsConfiguration} object to an
 * XML fragment that can be sent to Amazon S3.
 *
 * @param config
 *            The {@link com.amazonaws.services.s3.model.analytics.AnalyticsConfiguration}
 */
 /*
  * <AnalyticsConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
       <Id>XXX</Id>
       <Filter>
         <And>
           <Prefix>documents/</Prefix>
           <Tag>
             <Key>foo</Key>
             <Value>bar</Value>
           </Tag>
         </And>
       </Filter>
       <StorageClassAnalysis>
         <DataExport>
           <OutputSchemaVersion>1</OutputSchemaVersion>
           <Destination>
             <S3BucketDestination>
               <Format>CSV</Format>
               <BucketAccountId>123456789</BucketAccountId>
               <Bucket>destination-bucket</Bucket>
               <Prefix>destination-prefix</Prefix>
             </S3BucketDestination>
           </Destination>
         </DataExport>
       </StorageClassAnalysis>
    </AnalyticsConfiguration>
 */
public byte[] convertToXmlByteArray(AnalyticsConfiguration config) throws SdkClientException {
    XmlWriter xml = new XmlWriter();

    xml.start("AnalyticsConfiguration", "xmlns", Constants.XML_NAMESPACE);

    addParameterIfNotNull(xml, "Id", config.getId());
    writeAnalyticsFilter(xml, config.getFilter());
    writeStorageClassAnalysis(xml, config.getStorageClassAnalysis());

    xml.end();

    return xml.getBytes();
}
项目:ibm-cos-sdk-java    文件:GetBucketAnalyticsConfigurationResult.java   
/**
 * Returns the requested analytics configuration.
 */
public AnalyticsConfiguration getAnalyticsConfiguration() {
    return analyticsConfiguration;
}
项目:ibm-cos-sdk-java    文件:GetBucketAnalyticsConfigurationResult.java   
/**
 * Sets the requested analytics configuration.
 */
public void setAnalyticsConfiguration(AnalyticsConfiguration analyticsConfiguration) {
    this.analyticsConfiguration = analyticsConfiguration;
}
项目:ibm-cos-sdk-java    文件:GetBucketAnalyticsConfigurationResult.java   
/**
 * Sets the requested analytics configuration and returns the
 * {@link GetBucketAnalyticsConfigurationResult} object for method chaining.
 */
public GetBucketAnalyticsConfigurationResult withAnalyticsConfiguration(AnalyticsConfiguration analyticsConfiguration) {
    setAnalyticsConfiguration(analyticsConfiguration);
    return this;
}
项目:ibm-cos-sdk-java    文件:ListBucketAnalyticsConfigurationsResult.java   
/**
 * Returns the list of analytics configurations for a bucket.
 */
public List<AnalyticsConfiguration> getAnalyticsConfigurationList() {
    return analyticsConfigurationList;
}
项目:ibm-cos-sdk-java    文件:ListBucketAnalyticsConfigurationsResult.java   
/**
 * Sets the list of analytics configurations for a bucket.
 */
public void setAnalyticsConfigurationList(List<AnalyticsConfiguration> analyticsConfigurationList) {
    this.analyticsConfigurationList = analyticsConfigurationList;
}
项目:ibm-cos-sdk-java    文件:ListBucketAnalyticsConfigurationsResult.java   
/**
 * Sets the list of analytics configurations for a bucket and returns
 * {@link ListBucketAnalyticsConfigurationsResult} object for method chaining.
 */
public ListBucketAnalyticsConfigurationsResult withAnalyticsConfigurationList(List<AnalyticsConfiguration> analyticsConfigurationList) {
    setAnalyticsConfigurationList(analyticsConfigurationList);
    return this;
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public SetBucketAnalyticsConfigurationResult setBucketAnalyticsConfiguration(String bucketName, AnalyticsConfiguration analyticsConfiguration) throws AmazonServiceException, AmazonServiceException {
  return call(() -> getDelegate().setBucketAnalyticsConfiguration(bucketName, analyticsConfiguration));
}