org.jclouds.savvis.vpdc.binders
Class BindFirewallRuleToXmlPayload

java.lang.Object
  extended by org.jclouds.rest.binders.BindToStringPayload
      extended by org.jclouds.savvis.vpdc.binders.BindFirewallRuleToXmlPayload
All Implemented Interfaces:
Binder, MapBinder

@Singleton
public class BindFirewallRuleToXmlPayload
extends BindToStringPayload
implements MapBinder

Author:
Kedar Dave

Constructor Summary
BindFirewallRuleToXmlPayload()
           
 
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 toBind)
           
protected  com.jamesmurty.utils.XMLBuilder buildRoot()
           
protected  FirewallRule findRuleInArgsOrNull(GeneratedHttpRequest<?> gRequest)
           
 String generateXml(FirewallRule firewallRule)
           
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

BindFirewallRuleToXmlPayload

public BindFirewallRuleToXmlPayload()
Method Detail

bindToRequest

public <R extends HttpRequest> R bindToRequest(R request,
                                               Object toBind)
Specified by:
bindToRequest in interface Binder
Overrides:
bindToRequest in class BindToStringPayload

findRuleInArgsOrNull

protected FirewallRule findRuleInArgsOrNull(GeneratedHttpRequest<?> gRequest)

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

public String generateXml(FirewallRule firewallRule)

buildRoot

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

ifNullDefaultTo

protected String ifNullDefaultTo(String value,
                                 String defaultValue)


Copyright © 2009-2011 jclouds. All Rights Reserved.