EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.vcloud.binders]

COVERAGE SUMMARY FOR SOURCE FILE [BindCloneVAppParamsToXmlPayload.java]

nameclass, %method, %block, %line, %
BindCloneVAppParamsToXmlPayload.java100% (1/1)100% (5/5)100% (39/39)100% (6/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BindCloneVAppParamsToXmlPayload100% (1/1)100% (5/5)100% (39/39)100% (6/6)
BindCloneVAppParamsToXmlPayload (BindToStringPayload, String, String): void 100% (1/1)100% (6/6)100% (2/2)
buildRoot (String, CloneVAppOptions): XMLBuilder 100% (1/1)100% (27/27)100% (1/1)
getOptionClass (): Class 100% (1/1)100% (2/2)100% (1/1)
getRootElement (): String 100% (1/1)100% (2/2)100% (1/1)
getSourceMediaType (): String 100% (1/1)100% (2/2)100% (1/1)

1/**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  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,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.vcloud.binders;
20 
21import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_XML_NAMESPACE;
22import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_XML_SCHEMA;
23 
24import javax.inject.Named;
25import javax.inject.Singleton;
26 
27import org.jclouds.rest.binders.BindToStringPayload;
28import org.jclouds.vcloud.VCloudMediaType;
29import org.jclouds.vcloud.options.CloneVAppOptions;
30 
31import com.google.inject.Inject;
32import com.jamesmurty.utils.XMLBuilder;
33 
34/**
35 * 
36 * @author Adrian Cole
37 * 
38 */
39@Singleton
40public class BindCloneVAppParamsToXmlPayload extends BindCloneParamsToXmlPayload<CloneVAppOptions> {
41 
42   @Inject
43   public BindCloneVAppParamsToXmlPayload(BindToStringPayload stringBinder,
44            @Named(PROPERTY_VCLOUD_XML_NAMESPACE) String ns, @Named(PROPERTY_VCLOUD_XML_SCHEMA) String schema) {
45      super(stringBinder, ns, schema);
46   }
47 
48   @Override
49   protected Class<CloneVAppOptions> getOptionClass() {
50      return CloneVAppOptions.class;
51   }
52 
53   @Override
54   protected String getRootElement() {
55      return "CloneVAppParams";
56   }
57 
58   @Override
59   protected String getSourceMediaType() {
60      return VCloudMediaType.VAPP_XML;
61   }
62 
63   protected XMLBuilder buildRoot(String name, CloneVAppOptions options) {
64      return super.buildRoot(name, options).a("deploy", options.isDeploy() + "").a("powerOn", options.isPowerOn() + "");
65   }
66 
67}

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