Package org.jclouds.profitbricks.binder
Class BaseProfitBricksRequestBinder<T>
- java.lang.Object
-
- org.jclouds.profitbricks.binder.BaseProfitBricksRequestBinder<T>
-
- Direct Known Subclasses:
AddFirewallRuleToNicRequestBinder
,AddRomDriveToServerRequestBinder
,ConnectStorageToServerRequestBinder
,CreateDataCenterRequestBinder
,CreateLoadBalancerRequestBinder
,CreateNicRequestBinder
,CreateServerRequestBinder
,CreateSnapshotRequestBinder
,CreateStorageRequestBinder
,DeregisterLoadBalancerRequestBinder
,FirewallBinder
,RegisterLoadBalancerRequestBinder
,RollbackSnapshotRequestBinder
,SetInternetAccessBinder
,UpdateDataCenterRequestBinder
,UpdateLoadBalancerRequestBinder
,UpdateNicRequestBinder
,UpdateServerRequestBinder
,UpdateSnapshotRequestBinder
,UpdateStorageRequestBinder
public abstract class BaseProfitBricksRequestBinder<T> extends Object implements MapBinder
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseProfitBricksRequestBinder(String paramName)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <R extends HttpRequest>
RbindToRequest(R request, Object input)
<R extends HttpRequest>
RbindToRequest(R request, Map<String,Object> postParams)
creates and binds the POST payload to the request using parameters specified.protected abstract String
createPayload(T payload)
protected <R extends HttpRequest>
RcreateRequest(R fromRequest, String payload)
protected static String
formatIfNotEmpty(String pattern, Object param)
protected static String
nullableToString(Object object)
-
-
-
Field Detail
-
paramName
protected final String paramName
-
-
Constructor Detail
-
BaseProfitBricksRequestBinder
protected BaseProfitBricksRequestBinder(String paramName)
-
-
Method Detail
-
bindToRequest
public <R extends HttpRequest> R bindToRequest(R request, Map<String,Object> postParams)
Description copied from interface:MapBinder
creates and binds the POST payload to the request using parameters specified.- Specified by:
bindToRequest
in interfaceMapBinder
- See Also:
PayloadParam
-
bindToRequest
public <R extends HttpRequest> R bindToRequest(R request, Object input)
- Specified by:
bindToRequest
in interfaceBinder
-
createRequest
protected <R extends HttpRequest> R createRequest(R fromRequest, String payload)
-
-