org.jclouds.savvis.vpdc.binders
Class BaseBindVMSpecToXmlPayload<T>

java.lang.Object
  extended by org.jclouds.rest.binders.BindToStringPayload
      extended by org.jclouds.savvis.vpdc.binders.BaseBindVMSpecToXmlPayload<T>
All Implemented Interfaces:
org.jclouds.rest.Binder, org.jclouds.rest.MapBinder
Direct Known Subclasses:
BindVMSpecsToXmlPayload, BindVMSpecToXmlPayload

public abstract class BaseBindVMSpecToXmlPayload<T>
extends org.jclouds.rest.binders.BindToStringPayload
implements org.jclouds.rest.MapBinder

Author:
Adrian Cole

Constructor Summary
BaseBindVMSpecToXmlPayload()
           
 
Method Summary
protected  void addOperatingSystemAndVirtualHardware(VMSpec spec, com.jamesmurty.utils.XMLBuilder vAppBuilder)
           
protected abstract  void bindSpec(T spec, com.jamesmurty.utils.XMLBuilder rootBuilder)
           
<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 toBind)
           
protected  com.jamesmurty.utils.XMLBuilder buildChildren(com.jamesmurty.utils.XMLBuilder rootBuilder)
           
protected  com.jamesmurty.utils.XMLBuilder buildRoot()
           
protected  com.jamesmurty.utils.XMLBuilder buildRootForName(com.jamesmurty.utils.XMLBuilder rootBuilder, String name)
           
protected  void checkSpec(VMSpec spec)
           
protected abstract  T findSpecInArgsOrNull(org.jclouds.rest.internal.GeneratedHttpRequest<?> gRequest)
           
 String generateXml(T spec)
           
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
 

Constructor Detail

BaseBindVMSpecToXmlPayload

public BaseBindVMSpecToXmlPayload()
Method Detail

bindToRequest

public <R extends org.jclouds.http.HttpRequest> R bindToRequest(R request,
                                                                Object toBind)
Specified by:
bindToRequest in interface org.jclouds.rest.Binder
Overrides:
bindToRequest in class org.jclouds.rest.binders.BindToStringPayload

findSpecInArgsOrNull

protected abstract T findSpecInArgsOrNull(org.jclouds.rest.internal.GeneratedHttpRequest<?> gRequest)

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

public String generateXml(T spec)

bindSpec

protected abstract void bindSpec(T spec,
                                 com.jamesmurty.utils.XMLBuilder rootBuilder)
                          throws ParserConfigurationException,
                                 FactoryConfigurationError
Throws:
ParserConfigurationException
FactoryConfigurationError

checkSpec

protected void checkSpec(VMSpec spec)

addOperatingSystemAndVirtualHardware

protected void addOperatingSystemAndVirtualHardware(VMSpec spec,
                                                    com.jamesmurty.utils.XMLBuilder vAppBuilder)

buildRoot

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

buildChildren

protected com.jamesmurty.utils.XMLBuilder buildChildren(com.jamesmurty.utils.XMLBuilder rootBuilder)
                                                 throws ParserConfigurationException,
                                                        FactoryConfigurationError
Throws:
ParserConfigurationException
FactoryConfigurationError

buildRootForName

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

ifNullDefaultTo

protected String ifNullDefaultTo(String value,
                                 String defaultValue)


Copyright © 2009-2011 jclouds. All Rights Reserved.