de.agilecoders.wicket.jquery.settings
Class DefaultObjectMapperFactory

java.lang.Object
  extended by de.agilecoders.wicket.jquery.settings.DefaultObjectMapperFactory
All Implemented Interfaces:
ObjectMapperFactory
Direct Known Subclasses:
SingletonObjectMapperFactory

public class DefaultObjectMapperFactory
extends Object
implements ObjectMapperFactory

ObjectMapper factory

Author:
Michael Haitz

Nested Class Summary
protected static class DefaultObjectMapperFactory.Holder
          lazy holder pattern to prevent instantiation of serializers if not used.
 
Constructor Summary
DefaultObjectMapperFactory()
          Construct.
 
Method Summary
protected  com.fasterxml.jackson.databind.Module addSerializer(com.fasterxml.jackson.databind.module.SimpleModule module)
          adds custom serializers to given module
protected  com.fasterxml.jackson.databind.ObjectMapper configure(com.fasterxml.jackson.databind.ObjectMapper mapper)
          configures given object mapper instance.
protected  com.fasterxml.jackson.databind.Module newModule()
           
 com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultObjectMapperFactory

public DefaultObjectMapperFactory()
Construct.

Method Detail

newObjectMapper

public com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
Specified by:
newObjectMapper in interface ObjectMapperFactory
Returns:
new object mapper instance

newModule

protected com.fasterxml.jackson.databind.Module newModule()
Returns:
new mapper module

addSerializer

protected com.fasterxml.jackson.databind.Module addSerializer(com.fasterxml.jackson.databind.module.SimpleModule module)
adds custom serializers to given module

Parameters:
module - the module to extend
Returns:
module instance for chaining

configure

protected com.fasterxml.jackson.databind.ObjectMapper configure(com.fasterxml.jackson.databind.ObjectMapper mapper)
configures given object mapper instance.

Parameters:
mapper - the object to configure
Returns:
mapper instance for chaining


Copyright © 2017. All Rights Reserved.