org.jclouds.trmk.vcloud_0_8.binders
Class BindCloneVAppParamsToXmlPayload

java.lang.Object
  extended by org.jclouds.trmk.vcloud_0_8.binders.BindCloneVAppParamsToXmlPayload
All Implemented Interfaces:
Binder, MapBinder

@Singleton
public class BindCloneVAppParamsToXmlPayload
extends Object
implements MapBinder

Author:
Adrian Cole

Field Summary
protected  String ns
           
protected  String schema
           
 
Constructor Summary
BindCloneVAppParamsToXmlPayload(BindToStringPayload stringBinder, String ns, String schema)
           
 
Method Summary
<R extends HttpRequest>
R
bindToRequest(R request, Map<String,String> postParams)
          creates and binds the POST payload to the request using parameters specified.
<R extends HttpRequest>
R
bindToRequest(R request, Object input)
           
protected  com.jamesmurty.utils.XMLBuilder buildRoot(String name, boolean deploy, boolean powerOn)
           
protected  CloneVAppOptions findOptionsInArgsOrNull(GeneratedHttpRequest<?> gRequest)
           
protected  String generateXml(String newName, String vApp, CloneVAppOptions options)
           
protected  String ifNullDefaultTo(String 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
Constructor Detail

BindCloneVAppParamsToXmlPayload

@Inject
public BindCloneVAppParamsToXmlPayload(BindToStringPayload stringBinder,
                                              @Named(value="jclouds.vcloud.xml.ns")
                                              String ns,
                                              @Named(value="jclouds.vcloud.xml.schema")
                                              String schema)
Method Detail

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

buildRoot

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

generateXml

protected String generateXml(String newName,
                             String vApp,
                             CloneVAppOptions options)
                      throws ParserConfigurationException,
                             FactoryConfigurationError,
                             TransformerException
Throws:
ParserConfigurationException
FactoryConfigurationError
TransformerException

findOptionsInArgsOrNull

protected CloneVAppOptions findOptionsInArgsOrNull(GeneratedHttpRequest<?> gRequest)

bindToRequest

public <R extends HttpRequest> R bindToRequest(R request,
                                               Object input)
Specified by:
bindToRequest in interface Binder

ifNullDefaultTo

protected String ifNullDefaultTo(String value,
                                 String defaultValue)


Copyright © 2009-2011 jclouds. All Rights Reserved.