final VelocityPageContextDataPojo context = new VelocityPageContextDataPojo();
// TODO : move this value in a EngineSetting
context.setCartMaxItemQuantity(5);
UrlPojo url = new UrlPojo();
url = new UrlPojo();
url.setCode(FoUrls.ADD_TO_WISHLIST_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.ADD_TO_WISHLIST_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
url = new UrlPojo();
url.setCode(FoUrls.GET_CART_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.GET_CART_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
url = new UrlPojo();
url.setCode(FoUrls.ADD_TO_CART_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.ADD_TO_CART_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
url = new UrlPojo();
url.setCode(FoUrls.UPDATE_CART_ITEM_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.UPDATE_CART_ITEM_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
url = new UrlPojo();
url.setCode(FoUrls.DELETE_CART_ITEM_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.DELETE_CART_ITEM_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
url = new UrlPojo();
url.setCode(FoUrls.SET_SHIPPING_ADDRESS_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.SET_SHIPPING_ADDRESS_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
url = new UrlPojo();
url.setCode(FoUrls.SET_BILLING_ADDRESS_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.SET_BILLING_ADDRESS_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
url = new UrlPojo();
url.setCode(FoUrls.SET_DELIVERY_METHOD_AJAX.name());
url.setUrl(urlService.generateUrl(FoUrls.SET_DELIVERY_METHOD_AJAX, requestData));
url.setMethod("GET");
context.getUrls().add(url);
ObjectMapper mapper = new ObjectMapper();
try {
String contextJson = mapper.writeValueAsString(context);