EMMA Coverage Report (generated Wed Jun 22 19:47:49 EDT 2011)
[all classes][org.jclouds.aws.s3]

COVERAGE SUMMARY FOR SOURCE FILE [AWSS3PropertiesBuilder.java]

nameclass, %method, %block, %line, %
AWSS3PropertiesBuilder.java100% (1/1)67%  (2/3)93%  (42/45)85%  (11/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AWSS3PropertiesBuilder100% (1/1)67%  (2/3)93%  (42/45)85%  (11/13)
AWSS3PropertiesBuilder (): void 0%   (0/1)0%   (0/3)0%   (0/2)
AWSS3PropertiesBuilder (Properties): void 100% (1/1)100% (4/4)100% (2/2)
defaultProperties (): Properties 100% (1/1)100% (38/38)100% (9/9)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.aws.s3;
20 
21import static org.jclouds.Constants.PROPERTY_ENDPOINT;
22import static org.jclouds.aws.domain.Region.AP_NORTHEAST_1;
23import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_1;
24import static org.jclouds.aws.domain.Region.US_STANDARD;
25import static org.jclouds.aws.domain.Region.US_WEST_1;
26import static org.jclouds.location.reference.LocationConstants.ENDPOINT;
27import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;
28 
29import java.util.Properties;
30 
31import org.jclouds.aws.domain.Region;
32 
33/**
34 * Builds properties used in S3 Clients
35 * 
36 * @author Adrian Cole
37 */
38public class AWSS3PropertiesBuilder extends org.jclouds.s3.S3PropertiesBuilder {
39 
40   @Override
41   protected Properties defaultProperties() {
42      Properties properties = super.defaultProperties();
43      properties.putAll(Region.regionPropertiesS3());
44      properties.setProperty(PROPERTY_ENDPOINT, "https://s3.amazonaws.com");
45      properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + ENDPOINT, "https://s3.amazonaws.com");
46      properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + "." + ENDPOINT, "https://s3-us-west-1.amazonaws.com");
47      properties.setProperty(PROPERTY_REGION + "." + "EU" + "." + ENDPOINT, "https://s3-eu-west-1.amazonaws.com");
48      properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ENDPOINT,
49            "https://s3-ap-southeast-1.amazonaws.com");
50      properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ENDPOINT,
51            "https://s3-ap-northeast-1.amazonaws.com");
52      return properties;
53   }
54 
55   public AWSS3PropertiesBuilder() {
56      super();
57   }
58 
59   public AWSS3PropertiesBuilder(Properties properties) {
60      super(properties);
61   }
62 
63}

[all classes][org.jclouds.aws.s3]
EMMA 2.0.5312 (C) Vladimir Roubtsov