@Singleton public class BindInstantiateVAppTemplateParamsToXmlPayload extends Object implements MapBinder
Modifier and Type | Field and Description |
---|---|
protected String |
ns |
protected String |
schema |
protected Map<ResourceAllocationSettingData.ResourceType,String> |
virtualHardwareToInstanceId |
Constructor and Description |
---|
BindInstantiateVAppTemplateParamsToXmlPayload(BindToStringPayload stringBinder,
String ns,
String schema,
com.google.common.base.Supplier<ReferenceType> network,
String fenceMode) |
Modifier and Type | Method and Description |
---|---|
protected void |
addNetworkConfig(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder,
String name,
String fenceMode,
URI network) |
protected void |
addVirtualQuantityIfPresent(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder,
SortedMap<ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity) |
<R extends HttpRequest> |
bindToRequest(R request,
Map<String,String> postParams)
creates and binds the POST payload to the request using parameters specified.
|
<R extends HttpRequest> |
bindToRequest(R request,
Object input) |
protected com.jamesmurty.utils.XMLBuilder |
buildRoot(String name) |
protected InstantiateVAppTemplateOptions |
findOptionsInArgsOrNull(GeneratedHttpRequest<?> gRequest) |
protected String |
generateXml(String name,
String template,
SortedMap<ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity,
String networkName,
String fenceMode,
URI network) |
protected String |
ifNullDefaultTo(Object value,
String defaultValue) |
protected final String ns
protected final String schema
protected final Map<ResourceAllocationSettingData.ResourceType,String> virtualHardwareToInstanceId
@Inject public BindInstantiateVAppTemplateParamsToXmlPayload(BindToStringPayload stringBinder, @Named(value="jclouds.vcloud.xml.ns") String ns, @Named(value="jclouds.vcloud.xml.schema") String schema, com.google.common.base.Supplier<ReferenceType> network, @Named(value="jclouds.vcloud.defaults.fencemode") String fenceMode)
public <R extends HttpRequest> R bindToRequest(R request, Map<String,String> postParams)
MapBinder
bindToRequest
in interface MapBinder
PayloadParam
protected String generateXml(String name, String template, SortedMap<ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity, String networkName, @Nullable String fenceMode, URI network) throws ParserConfigurationException, FactoryConfigurationError, TransformerException
protected void addNetworkConfig(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder, String name, @Nullable String fenceMode, URI network)
protected com.jamesmurty.utils.XMLBuilder buildRoot(String name) throws ParserConfigurationException, FactoryConfigurationError
public <R extends HttpRequest> R bindToRequest(R request, Object input)
bindToRequest
in interface Binder
protected InstantiateVAppTemplateOptions findOptionsInArgsOrNull(GeneratedHttpRequest<?> gRequest)
protected void addVirtualQuantityIfPresent(com.jamesmurty.utils.XMLBuilder instantiationParamsBuilder, SortedMap<ResourceAllocationSettingData.ResourceType,String> virtualHardwareQuantity)
Copyright © 2009-2012 jclouds. All Rights Reserved.