this.jsonBinder = checkNotNull(jsonBinder, "jsonBinder");
}
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
GroupConfiguration gc = (GroupConfiguration) postParams.get("groupConfiguration");
Map<String, Object> gcMap = Maps.newHashMap();
gcMap.put("name", gc.getName());
gcMap.put("cooldown", gc.getCooldown());
gcMap.put("minEntities", gc.getMinEntities());
gcMap.put("maxEntities", gc.getMaxEntities());
gcMap.put("metadata", gc.getMetadata());
request.setPayload(jsonBinder.toJson(gcMap));
request.getPayload().getContentMetadata().setContentType("application/json");
return request;
}