com.pmease.quickbuild.rest.json
Class ObjectMapperFactory

java.lang.Object
  extended by com.pmease.quickbuild.rest.json.ObjectMapperFactory

public class ObjectMapperFactory
extends java.lang.Object

A factory class for ObjectMapper.

By default, ObjectMapperFactory is configured to:


Constructor Summary
ObjectMapperFactory()
          Create a new ObjectMapperFactory.
 
Method Summary
 com.fasterxml.jackson.databind.ObjectMapper build()
          Builds a new ObjectMapper instance with a default JsonFactory instance.
 com.fasterxml.jackson.databind.ObjectMapper build(com.fasterxml.jackson.core.JsonFactory factory)
          Builds a new ObjectMapper instance with the given JsonFactory instance.
 ObjectMapperFactory copy()
          Creates a copy of this.
 void disable(com.fasterxml.jackson.databind.DeserializationFeature... features)
          Disables the given DeserializationFeatures.
 void disable(com.fasterxml.jackson.core.JsonFactory.Feature... features)
          Disables the given JsonFactory.Features.
 void disable(com.fasterxml.jackson.core.JsonGenerator.Feature... features)
          Disables the given JsonGenerator.Features.
 void disable(com.fasterxml.jackson.core.JsonParser.Feature... features)
          Disables the given JsonParser.Features.
 void disable(com.fasterxml.jackson.databind.MapperFeature... features)
          Disables the given MapperFeatures.
 void disable(com.fasterxml.jackson.databind.SerializationFeature... features)
          Disables the given SerializationFeatures.
 void enable(com.fasterxml.jackson.databind.DeserializationFeature... features)
          Enables the given DeserializationFeatures.
 void enable(com.fasterxml.jackson.core.JsonFactory.Feature... features)
          Enables the given JsonFactory.Features.
 void enable(com.fasterxml.jackson.core.JsonGenerator.Feature... features)
          Enables the given JsonGenerator.Features.
 void enable(com.fasterxml.jackson.core.JsonParser.Feature... features)
          Enables the given JsonParser.Features.
 void enable(com.fasterxml.jackson.databind.MapperFeature... features)
          Enables the given MapperFeatures.
 void enable(com.fasterxml.jackson.databind.SerializationFeature... features)
          Enables the given SerializationFeatures.
 com.fasterxml.jackson.databind.AnnotationIntrospector getAnnotationIntrospector()
           
 java.text.DateFormat getDateFormat()
           
 com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?> getDefaultTyping()
           
 com.fasterxml.jackson.databind.ser.FilterProvider getFilters()
           
 com.fasterxml.jackson.databind.cfg.HandlerInstantiator getHandlerInstantiator()
           
 com.fasterxml.jackson.databind.InjectableValues getInjectableValues()
           
 java.util.Locale getLocale()
           
 java.util.Map<java.lang.Class<?>,java.lang.Class<?>> getMixinAnnotations()
           
 com.fasterxml.jackson.databind.node.JsonNodeFactory getNodeFactory()
           
 com.fasterxml.jackson.databind.PropertyNamingStrategy getPropertyNamingStrategy()
           
 com.fasterxml.jackson.annotation.JsonInclude.Include getSerializationInclusion()
           
 com.fasterxml.jackson.databind.ser.SerializerFactory getSerializerFactory()
           
 com.fasterxml.jackson.databind.ser.DefaultSerializerProvider getSerializerProvider()
           
 com.fasterxml.jackson.databind.jsontype.SubtypeResolver getSubtypeResolver()
           
 java.util.TimeZone getTimeZone()
           
 com.fasterxml.jackson.databind.type.TypeFactory getTypeFactory()
           
 com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getVisibility(com.fasterxml.jackson.annotation.PropertyAccessor accessor)
           
 com.fasterxml.jackson.databind.introspect.VisibilityChecker<?> getVisibilityChecker()
           
 boolean isEnabled(com.fasterxml.jackson.databind.DeserializationFeature feature)
          Returns true if the given DeserializationFeature is enabled.
 boolean isEnabled(com.fasterxml.jackson.core.JsonFactory.Feature feature)
          Returns true if the given JsonFactory.Feature is enabled.
 boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature feature)
          Returns true if the given JsonGenerator.Feature is enabled.
 boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature feature)
          Returns true if the given JsonParser.Feature is enabled.
 boolean isEnabled(com.fasterxml.jackson.databind.MapperFeature feature)
          Returns true if the given MapperFeature is enabled.
 boolean isEnabled(com.fasterxml.jackson.databind.SerializationFeature feature)
          Returns true if the given SerializationFeature is enabled.
 void registerModule(com.fasterxml.jackson.databind.Module module)
          Registers a module that can extend functionality provided by this class; for example, by adding providers for custom serializers and deserializers.
 void setAnnotationIntrospector(com.fasterxml.jackson.databind.AnnotationIntrospector annotationIntrospector)
           
 void setDateFormat(java.text.DateFormat dateFormat)
           
 void setDefaultTyping(com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?> defaultTyping)
           
 void setFilters(com.fasterxml.jackson.databind.ser.FilterProvider filters)
           
 void setHandlerInstantiator(com.fasterxml.jackson.databind.cfg.HandlerInstantiator handlerInstantiator)
           
 void setInjectableValues(com.fasterxml.jackson.databind.InjectableValues injectableValues)
           
 void setLocale(java.util.Locale locale)
           
 void setMixinAnnotations(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> mixinAnnotations)
           
 void setNodeFactory(com.fasterxml.jackson.databind.node.JsonNodeFactory nodeFactory)
           
 void setPropertyNamingStrategy(com.fasterxml.jackson.databind.PropertyNamingStrategy propertyNamingStrategy)
           
 void setSerializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include serializationInclusion)
           
 void setSerializerFactory(com.fasterxml.jackson.databind.ser.SerializerFactory serializerFactory)
           
 void setSerializerProvider(com.fasterxml.jackson.databind.ser.DefaultSerializerProvider serializerProvider)
           
 void setSubtypeResolver(com.fasterxml.jackson.databind.jsontype.SubtypeResolver subtypeResolver)
           
 void setTimeZone(java.util.TimeZone timeZone)
           
 void setTypeFactory(com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
           
 void setVisibilityChecker(com.fasterxml.jackson.databind.introspect.VisibilityChecker<?> visibilityChecker)
           
 void setVisibilityRules(com.fasterxml.jackson.annotation.PropertyAccessor accessor, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility visibility)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectMapperFactory

public ObjectMapperFactory()
Create a new ObjectMapperFactory.

Method Detail

getAnnotationIntrospector

public com.fasterxml.jackson.databind.AnnotationIntrospector getAnnotationIntrospector()

setAnnotationIntrospector

public void setAnnotationIntrospector(com.fasterxml.jackson.databind.AnnotationIntrospector annotationIntrospector)

getDateFormat

public java.text.DateFormat getDateFormat()

setDateFormat

public void setDateFormat(java.text.DateFormat dateFormat)

getDefaultTyping

public com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?> getDefaultTyping()

setDefaultTyping

public void setDefaultTyping(com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder<?> defaultTyping)

getFilters

public com.fasterxml.jackson.databind.ser.FilterProvider getFilters()

setFilters

public void setFilters(com.fasterxml.jackson.databind.ser.FilterProvider filters)

getHandlerInstantiator

public com.fasterxml.jackson.databind.cfg.HandlerInstantiator getHandlerInstantiator()

setHandlerInstantiator

public void setHandlerInstantiator(com.fasterxml.jackson.databind.cfg.HandlerInstantiator handlerInstantiator)

getInjectableValues

public com.fasterxml.jackson.databind.InjectableValues getInjectableValues()

setInjectableValues

public void setInjectableValues(com.fasterxml.jackson.databind.InjectableValues injectableValues)

getLocale

public java.util.Locale getLocale()

setLocale

public void setLocale(java.util.Locale locale)

getMixinAnnotations

public java.util.Map<java.lang.Class<?>,java.lang.Class<?>> getMixinAnnotations()

setMixinAnnotations

public void setMixinAnnotations(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> mixinAnnotations)

getNodeFactory

public com.fasterxml.jackson.databind.node.JsonNodeFactory getNodeFactory()

setNodeFactory

public void setNodeFactory(com.fasterxml.jackson.databind.node.JsonNodeFactory nodeFactory)

getPropertyNamingStrategy

public com.fasterxml.jackson.databind.PropertyNamingStrategy getPropertyNamingStrategy()

setPropertyNamingStrategy

public void setPropertyNamingStrategy(com.fasterxml.jackson.databind.PropertyNamingStrategy propertyNamingStrategy)

getSerializationInclusion

public com.fasterxml.jackson.annotation.JsonInclude.Include getSerializationInclusion()

setSerializationInclusion

public void setSerializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include serializationInclusion)

getSerializerFactory

public com.fasterxml.jackson.databind.ser.SerializerFactory getSerializerFactory()

setSerializerFactory

public void setSerializerFactory(com.fasterxml.jackson.databind.ser.SerializerFactory serializerFactory)

getSerializerProvider

public com.fasterxml.jackson.databind.ser.DefaultSerializerProvider getSerializerProvider()

setSerializerProvider

public void setSerializerProvider(com.fasterxml.jackson.databind.ser.DefaultSerializerProvider serializerProvider)

getSubtypeResolver

public com.fasterxml.jackson.databind.jsontype.SubtypeResolver getSubtypeResolver()

setSubtypeResolver

public void setSubtypeResolver(com.fasterxml.jackson.databind.jsontype.SubtypeResolver subtypeResolver)

getTimeZone

public java.util.TimeZone getTimeZone()

setTimeZone

public void setTimeZone(java.util.TimeZone timeZone)

getTypeFactory

public com.fasterxml.jackson.databind.type.TypeFactory getTypeFactory()

setTypeFactory

public void setTypeFactory(com.fasterxml.jackson.databind.type.TypeFactory typeFactory)

getVisibility

public com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getVisibility(com.fasterxml.jackson.annotation.PropertyAccessor accessor)

setVisibilityRules

public void setVisibilityRules(com.fasterxml.jackson.annotation.PropertyAccessor accessor,
                               com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility visibility)

getVisibilityChecker

public com.fasterxml.jackson.databind.introspect.VisibilityChecker<?> getVisibilityChecker()

setVisibilityChecker

public void setVisibilityChecker(com.fasterxml.jackson.databind.introspect.VisibilityChecker<?> visibilityChecker)

registerModule

public void registerModule(com.fasterxml.jackson.databind.Module module)
Registers a module that can extend functionality provided by this class; for example, by adding providers for custom serializers and deserializers.

Parameters:
module - Module to register
See Also:
ObjectMapper.registerModule(Module)

isEnabled

public boolean isEnabled(com.fasterxml.jackson.databind.MapperFeature feature)
Returns true if the given MapperFeature is enabled.

Parameters:
feature - a given feature
Returns:
true if feature is enabled
See Also:
ObjectMapper.isEnabled(MapperFeature)

enable

public void enable(com.fasterxml.jackson.databind.MapperFeature... features)
Enables the given MapperFeatures.

Parameters:
features - a set of features to enable
See Also:
ObjectMapper.enable(MapperFeature...)

disable

public void disable(com.fasterxml.jackson.databind.MapperFeature... features)
Disables the given MapperFeatures.

Parameters:
features - a set of features to disable
See Also:
ObjectMapper.disable(MapperFeature...)

isEnabled

public boolean isEnabled(com.fasterxml.jackson.databind.DeserializationFeature feature)
Returns true if the given DeserializationFeature is enabled.

Parameters:
feature - a given feature
Returns:
true if feature is enabled
See Also:
ObjectMapper.isEnabled(DeserializationFeature)

enable

public void enable(com.fasterxml.jackson.databind.DeserializationFeature... features)
Enables the given DeserializationFeatures.

Parameters:
features - a set of features to enable
See Also:
ObjectMapper.enable(DeserializationFeature)

disable

public void disable(com.fasterxml.jackson.databind.DeserializationFeature... features)
Disables the given DeserializationFeatures.

Parameters:
features - a set of features to disable
See Also:
ObjectMapper.disable(DeserializationFeature)

isEnabled

public boolean isEnabled(com.fasterxml.jackson.databind.SerializationFeature feature)
Returns true if the given SerializationFeature is enabled.

Parameters:
feature - a given feature
Returns:
true if feature is enabled
See Also:
ObjectMapper.isEnabled(SerializationFeature)

enable

public void enable(com.fasterxml.jackson.databind.SerializationFeature... features)
Enables the given SerializationFeatures.

Parameters:
features - a set of features to enable
See Also:
ObjectMapper.enable(SerializationFeature)

disable

public void disable(com.fasterxml.jackson.databind.SerializationFeature... features)
Disables the given SerializationFeatures.

Parameters:
features - a set of features to disable
See Also:
ObjectMapper.disable(SerializationFeature)

isEnabled

public boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature feature)
Returns true if the given JsonGenerator.Feature is enabled.

Parameters:
feature - a given feature
Returns:
true if feature is enabled
See Also:
ObjectMapper.isEnabled(JsonGenerator.Feature)

enable

public void enable(com.fasterxml.jackson.core.JsonGenerator.Feature... features)
Enables the given JsonGenerator.Features.

Parameters:
features - a set of features to enable
See Also:
JsonFactory.enable(JsonGenerator.Feature)

disable

public void disable(com.fasterxml.jackson.core.JsonGenerator.Feature... features)
Disables the given JsonGenerator.Features.

Parameters:
features - a set of features to disable
See Also:
JsonFactory.disable(JsonGenerator.Feature)

isEnabled

public boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature feature)
Returns true if the given JsonParser.Feature is enabled.

Parameters:
feature - a given feature
Returns:
true if feature is enabled
See Also:
ObjectMapper.isEnabled(JsonParser.Feature)

enable

public void enable(com.fasterxml.jackson.core.JsonParser.Feature... features)
Enables the given JsonParser.Features.

Parameters:
features - a set of features to enable
See Also:
JsonFactory.enable(JsonParser.Feature)

disable

public void disable(com.fasterxml.jackson.core.JsonParser.Feature... features)
Disables the given JsonParser.Features.

Parameters:
features - a set of features to disable
See Also:
JsonFactory.disable(JsonParser.Feature)

isEnabled

public boolean isEnabled(com.fasterxml.jackson.core.JsonFactory.Feature feature)
Returns true if the given JsonFactory.Feature is enabled.

Parameters:
feature - a given feature
Returns:
true if feature is enabled
See Also:
ObjectMapper.isEnabled(JsonFactory.Feature)

enable

public void enable(com.fasterxml.jackson.core.JsonFactory.Feature... features)
Enables the given JsonFactory.Features.

Parameters:
features - a set of features to enable
See Also:
JsonFactory.enable(JsonFactory.Feature)

disable

public void disable(com.fasterxml.jackson.core.JsonFactory.Feature... features)
Disables the given JsonFactory.Features.

Parameters:
features - a set of features to disable
See Also:
JsonFactory.disable(JsonFactory.Feature)

build

public com.fasterxml.jackson.databind.ObjectMapper build(com.fasterxml.jackson.core.JsonFactory factory)
Builds a new ObjectMapper instance with the given JsonFactory instance.

Parameters:
factory - a JsonFactory
Returns:
a configured ObjectMapper instance

build

public com.fasterxml.jackson.databind.ObjectMapper build()
Builds a new ObjectMapper instance with a default JsonFactory instance.

Returns:
a configured ObjectMapper instance

copy

public ObjectMapperFactory copy()
Creates a copy of this.

Returns:
a copy of this


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.