org.jclouds.vcloud.binders
Class BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload

java.lang.Object
  extended by org.jclouds.vcloud.binders.BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload
All Implemented Interfaces:
org.jclouds.rest.Binder, org.jclouds.rest.MapBinder

@Singleton
public class BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload
extends Object
implements org.jclouds.rest.MapBinder

Author:
Adrian Cole

Field Summary
protected  String ns
           
protected  String schema
           
protected  Map<org.jclouds.cim.ResourceAllocationSettingData.ResourceType,String> virtualHardwareToInstanceId
           
 
Constructor Summary
BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload(org.jclouds.rest.binders.BindToStringPayload stringBinder, String apiVersion, String ns, String schema, URI network, String fenceMode)
           
 
Method Summary
protected  void addNetworkConfig(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder, String name, String fenceMode, URI network)
           
protected  void addVirtualQuantityIfPresent(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder, SortedMap<org.jclouds.cim.ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity)
           
<R extends org.jclouds.http.HttpRequest>
R
bindToRequest(R request, Map<String,String> postParams)
           
<R extends org.jclouds.http.HttpRequest>
R
bindToRequest(R request, Object input)
           
protected  com.jamesmurty.utils.XMLBuilder buildRoot(String name)
           
protected  InstantiateVAppTemplateOptions findOptionsInArgsOrNull(org.jclouds.rest.internal.GeneratedHttpRequest<?> gRequest)
           
protected  String generateXml(String name, String template, SortedMap<org.jclouds.cim.ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity, String networkName, String fenceMode, URI network)
           
protected  String ifNullDefaultTo(Object value, String defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ns

protected final String ns

schema

protected final String schema

virtualHardwareToInstanceId

protected final Map<org.jclouds.cim.ResourceAllocationSettingData.ResourceType,String> virtualHardwareToInstanceId
Constructor Detail

BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload

@Inject
public BindInstantiateVCloudExpressVAppTemplateParamsToXmlPayload(org.jclouds.rest.binders.BindToStringPayload stringBinder,
                                                                         @Named(value="jclouds.api-version")
                                                                         String apiVersion,
                                                                         @Named(value="jclouds.vcloud.xml.ns")
                                                                         String ns,
                                                                         @Named(value="jclouds.vcloud.xml.schema")
                                                                         String schema,
                                                                         URI network,
                                                                         @Named(value="jclouds.vcloud.defaults.fencemode")
                                                                         String fenceMode)
Method Detail

bindToRequest

public <R extends org.jclouds.http.HttpRequest> R bindToRequest(R request,
                                                                Map<String,String> postParams)
Specified by:
bindToRequest in interface org.jclouds.rest.MapBinder

generateXml

protected String generateXml(String name,
                             String template,
                             SortedMap<org.jclouds.cim.ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity,
                             String networkName,
                             @Nullable
                             String fenceMode,
                             URI network)
                      throws ParserConfigurationException,
                             FactoryConfigurationError,
                             TransformerException
Throws:
ParserConfigurationException
FactoryConfigurationError
TransformerException

addNetworkConfig

protected void addNetworkConfig(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder,
                                String name,
                                @Nullable
                                String fenceMode,
                                URI network)

addVirtualQuantityIfPresent

protected void addVirtualQuantityIfPresent(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder,
                                           SortedMap<org.jclouds.cim.ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity)

buildRoot

protected com.jamesmurty.utils.XMLBuilder buildRoot(String name)
                                             throws ParserConfigurationException,
                                                    FactoryConfigurationError
Throws:
ParserConfigurationException
FactoryConfigurationError

findOptionsInArgsOrNull

protected InstantiateVAppTemplateOptions findOptionsInArgsOrNull(org.jclouds.rest.internal.GeneratedHttpRequest<?> gRequest)

bindToRequest

public <R extends org.jclouds.http.HttpRequest> R bindToRequest(R request,
                                                                Object input)
Specified by:
bindToRequest in interface org.jclouds.rest.Binder

ifNullDefaultTo

protected String ifNullDefaultTo(Object value,
                                 String defaultValue)


Copyright © 2009-2011 jclouds. All Rights Reserved.