org.jclouds.vcloud.binders
Class BindInstantiateVAppTemplateParamsToXmlPayload
java.lang.Object
org.jclouds.vcloud.binders.BindInstantiateVAppTemplateParamsToXmlPayload
- All Implemented Interfaces:
- Binder, MapBinder
@Singleton
public class BindInstantiateVAppTemplateParamsToXmlPayload
- extends Object
- implements MapBinder
- Author:
- Adrian Cole
Method Summary |
protected void |
addNetworkConfig(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder,
Iterable<NetworkConfig> networkConfig)
|
|
bindToRequest(R request,
Map<String,String> postParams)
creates and binds the POST payload to the request using parameters specified. |
|
bindToRequest(R request,
Object input)
|
protected com.jamesmurty.utils.XMLBuilder |
buildRoot(String name)
|
protected InstantiateVAppTemplateOptions |
findOptionsInArgsOrNull(GeneratedHttpRequest<?> gRequest)
|
protected String |
generateXml(String name,
String description,
boolean deploy,
boolean powerOn,
URI template,
Iterable<NetworkConfig> networkConfig)
|
static
|
ifNullDefaultTo(T value,
T defaultValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ns
protected final String ns
schema
protected final String schema
stringBinder
protected final BindToStringPayload stringBinder
defaultNetwork
protected final ReferenceType defaultNetwork
defaultFenceMode
protected final FenceMode defaultFenceMode
templateCache
protected final com.google.common.cache.LoadingCache<URI,VAppTemplate> templateCache
defaultNetworkNameInTemplate
protected final com.google.common.base.Function<VAppTemplate,String> defaultNetworkNameInTemplate
BindInstantiateVAppTemplateParamsToXmlPayload
@Inject
public BindInstantiateVAppTemplateParamsToXmlPayload(com.google.common.cache.LoadingCache<URI,VAppTemplate> templateCache,
com.google.common.base.Function<VAppTemplate,String> defaultNetworkNameInTemplate,
BindToStringPayload stringBinder,
@Named(value="jclouds.vcloud.xml.ns")
String ns,
@Named(value="jclouds.vcloud.xml.schema")
String schema,
ReferenceType network,
FenceMode fenceMode)
bindToRequest
public <R extends HttpRequest> R bindToRequest(R request,
Map<String,String> postParams)
- Description copied from interface:
MapBinder
- creates and binds the POST payload to the request using parameters specified.
- Specified by:
bindToRequest
in interface MapBinder
- See Also:
PayloadParam
generateXml
protected String generateXml(String name,
@Nullable
String description,
boolean deploy,
boolean powerOn,
URI template,
Iterable<NetworkConfig> networkConfig)
throws ParserConfigurationException,
FactoryConfigurationError,
TransformerException
- Throws:
ParserConfigurationException
FactoryConfigurationError
TransformerException
addNetworkConfig
protected void addNetworkConfig(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder,
Iterable<NetworkConfig> networkConfig)
buildRoot
protected com.jamesmurty.utils.XMLBuilder buildRoot(String name)
throws ParserConfigurationException,
FactoryConfigurationError
- Throws:
ParserConfigurationException
FactoryConfigurationError
findOptionsInArgsOrNull
protected InstantiateVAppTemplateOptions findOptionsInArgsOrNull(GeneratedHttpRequest<?> gRequest)
bindToRequest
public <R extends HttpRequest> R bindToRequest(R request,
Object input)
- Specified by:
bindToRequest
in interface Binder
ifNullDefaultTo
public static <T> T ifNullDefaultTo(T value,
T defaultValue)
Copyright © 2009-2012 jclouds. All Rights Reserved.