@Test public void testLimitsOption() throws JsonProcessingException, IOException { ClientMapInfo map = new ClientMapInfo(); map.setViewBoundsLimitOption(BoundsLimitOption.CENTER_WITHIN_MAX_BOUNDS); ObjectMapper objectMapper = printingController.getObjectMapper(); String json = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(map); JsonNode tree = objectMapper.readTree(json); System.out.println(objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(tree)); ObjectReader reader = objectMapper.reader(ClientMapInfo.class); ClientMapInfo m = (ClientMapInfo)reader.readValue(json); m = (ClientMapInfo)reader.readValue("{\n" + " \"class\" : \"org.geomajas.configuration.client.ClientMapInfo\",\n" + " \"viewBoundsLimitOption\" : \"CENTER_WITHIN_MAX_BOUNDS\" \n" + "}"); }
protected ObjectMapper getObjectMapper() { return objectMapper; }
PrintingController { protected ObjectMapper getObjectMapper() { return objectMapper; } }
PrintingController { protected ObjectMapper getObjectMapper() { return objectMapper; }  }
PrintingController { protected ObjectMapper getObjectMapper() { return objectMapper; }  @RequestMapping(value = "/printing", method = RequestMethod.GET) ModelAndView printGet(@RequestParam("documentId") String documentId,
			@RequestParam(value = "download", defaultValue = DOWNLOAD_METHOD_SAVE, required = false) String download,
			@RequestParam(value = "name", defaultValue = "geomajas.pdf", required = false) String fileName,
			@RequestParam(value = "dpi", defaultValue = "72", required = false) int dpi); @RequestMapping(value = "/printing", method = RequestMethod.POST) ModelAndView printPost(
			@RequestParam(value = "download", defaultValue = DOWNLOAD_METHOD_SAVE, required = false) String download,
			@RequestParam(value = "name", defaultValue = "geomajas.pdf", required = false) String fileName,
			@RequestParam(value = "template") String templateJson,
			@RequestParam(value = "pageSize", required = false) String pageSize,
			@RequestParam(value = "dpi", defaultValue = "72", required = false) int dpi); @ExceptionHandler ModelAndView exception(PrintingException exception, HttpServletResponse response); @PostConstruct void postConstruct(); }
PrintingController { protected ObjectMapper getObjectMapper() { return objectMapper; }  @RequestMapping(value = "/printing", method = RequestMethod.GET) ModelAndView printGet(@RequestParam("documentId") String documentId,
			@RequestParam(value = "download", defaultValue = DOWNLOAD_METHOD_SAVE, required = false) String download,
			@RequestParam(value = "name", defaultValue = "geomajas.pdf", required = false) String fileName,
			@RequestParam(value = "dpi", defaultValue = "72", required = false) int dpi); @RequestMapping(value = "/printing", method = RequestMethod.POST) ModelAndView printPost(
			@RequestParam(value = "download", defaultValue = DOWNLOAD_METHOD_SAVE, required = false) String download,
			@RequestParam(value = "name", defaultValue = "geomajas.pdf", required = false) String fileName,
			@RequestParam(value = "template") String templateJson,
			@RequestParam(value = "pageSize", required = false) String pageSize,
			@RequestParam(value = "dpi", defaultValue = "72", required = false) int dpi); @ExceptionHandler ModelAndView exception(PrintingException exception, HttpServletResponse response); @PostConstruct void postConstruct(); static final String DOCUMENT_VIEW_NAME; static final String DOCUMENT_KEY; static final String DOWNLOAD_KEY; static final String FILENAME_KEY; static final String FORMAT_KEY; static final String DPI_KEY; static final String DOWNLOAD_METHOD_BROWSER; static final String DOWNLOAD_METHOD_SAVE; }