EMMA Coverage Report (generated Mon Dec 09 15:12:29 EST 2013)
[all classes][org.jclouds.glesys]

COVERAGE SUMMARY FOR SOURCE FILE [GleSYSApiMetadata.java]

nameclass, %method, %block, %line, %
GleSYSApiMetadata.java100% (3/3)100% (9/9)100% (89/89)100% (15/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class GleSYSApiMetadata100% (1/1)100% (5/5)100% (36/36)100% (10/10)
<static initializer> 100% (1/1)100% (5/5)100% (1/1)
GleSYSApiMetadata (): void 100% (1/1)100% (6/6)100% (2/2)
GleSYSApiMetadata (GleSYSApiMetadata$Builder): void 100% (1/1)100% (4/4)100% (2/2)
defaultProperties (): Properties 100% (1/1)100% (14/14)100% (4/4)
toBuilder (): GleSYSApiMetadata$Builder 100% (1/1)100% (7/7)100% (1/1)
     
class GleSYSApiMetadata$1100% (1/1)100% (1/1)100% (3/3)100% (1/1)
GleSYSApiMetadata$1 (): void 100% (1/1)100% (3/3)100% (1/1)
     
class GleSYSApiMetadata$Builder100% (1/1)100% (3/3)100% (50/50)100% (5/5)
GleSYSApiMetadata$Builder (): void 100% (1/1)100% (43/43)100% (3/3)
build (): GleSYSApiMetadata 100% (1/1)100% (5/5)100% (1/1)
self (): GleSYSApiMetadata$Builder 100% (1/1)100% (2/2)100% (1/1)

1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17package org.jclouds.glesys;
18 
19import static org.jclouds.reflect.Reflection2.typeToken;
20 
21import java.net.URI;
22import java.util.Properties;
23 
24import org.jclouds.apis.ApiMetadata;
25import org.jclouds.compute.ComputeServiceContext;
26import org.jclouds.glesys.compute.config.GleSYSComputeServiceContextModule;
27import org.jclouds.glesys.config.GleSYSRestClientModule;
28import org.jclouds.rest.internal.BaseRestApiMetadata;
29 
30import com.google.common.collect.ImmutableSet;
31import com.google.common.reflect.TypeToken;
32import com.google.inject.Module;
33 
34/**
35 * Implementation of {@link ApiMetadata} for  API
36 * 
37 * @author Adrian Cole
38 */
39public class GleSYSApiMetadata extends BaseRestApiMetadata {
40 
41   /**
42    * @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(GleSYSApi.class)} as
43    *             {@link GleSYSAsyncApi} interface will be removed in jclouds 1.7.
44    */
45   @Deprecated
46   public static final TypeToken<org.jclouds.rest.RestContext<GleSYSApi, GleSYSAsyncApi>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<GleSYSApi, GleSYSAsyncApi>>() {
47      private static final long serialVersionUID = 1L;
48   };
49   
50   @Override
51   public Builder toBuilder() {
52      return new Builder().fromApiMetadata(this);
53   }
54 
55   public GleSYSApiMetadata() {
56      this(new Builder());
57   }
58 
59   protected GleSYSApiMetadata(Builder builder) {
60      super(builder);
61   }
62 
63   public static Properties defaultProperties() {
64      Properties properties = BaseRestApiMetadata.defaultProperties();
65      properties.setProperty("jclouds.ssh.max-retries", "5");
66      properties.setProperty("jclouds.ssh.retry-auth", "true");
67      return properties;
68   }
69 
70   public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
71 
72      @SuppressWarnings("deprecation")
73      protected Builder() {
74         super(GleSYSApi.class, GleSYSAsyncApi.class);
75         id("glesys")
76         .name("GleSYS API")
77         .identityName("Username")
78         .credentialName("API Key")
79         .documentation(URI.create("https://customer.glesys.com/api.php"))
80         .version("1")
81         .buildVersion("3.5.0")
82         .defaultEndpoint("https://api.glesys.com")
83         .defaultProperties(GleSYSApiMetadata.defaultProperties())
84         .view(typeToken(ComputeServiceContext.class))
85         .defaultModules(ImmutableSet.<Class<? extends Module>>of(GleSYSComputeServiceContextModule.class, GleSYSRestClientModule.class));
86      }
87 
88      @Override
89      public GleSYSApiMetadata build() {
90         return new GleSYSApiMetadata(this);
91      }
92 
93      @Override
94      protected Builder self() {
95         return this;
96      }
97   }
98}

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