Package com.anaptecs.jeaf.json.impl
Class ObjectMapperConfiguration
- java.lang.Object
-
- com.anaptecs.jeaf.xfun.api.config.AnnotationBasedConfiguration<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig>
-
- com.anaptecs.jeaf.json.impl.ObjectMapperConfiguration
-
public class ObjectMapperConfiguration extends com.anaptecs.jeaf.xfun.api.config.AnnotationBasedConfiguration<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig>Class can be used to read annotation based configuration for ObjectMappers.- Author:
- JEAF Development Team
-
-
Constructor Summary
Constructors Constructor Description ObjectMapperConfiguration()Initialize object.ObjectMapperConfiguration(java.lang.String pResourceName, java.lang.String pConfigurationBasePath, boolean pExceptionOnError)Initialize object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>checkCustomConfiguration(com.anaptecs.jeaf.json.annotations.ObjectMapperConfig pCustomConfiguration)protected java.lang.Class<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig>getAnnotationClass()protected java.lang.StringgetDefaultConfigurationClass()com.fasterxml.jackson.annotation.JsonAutoDetect.VisibilitygetDefaultCreatorVisibility()Method returns the default creator visibility that should be used by an object mapper if nothing specific is defined on class or method level.com.fasterxml.jackson.annotation.JsonAutoDetect.VisibilitygetDefaultFieldVisibility()Method returns the default field visibility that should be used by an object mapper if nothing specific is defined on class or field level.com.fasterxml.jackson.annotation.JsonAutoDetect.VisibilitygetDefaultGetterVisibility()Method returns the default getter visibility that should be used by an object mapper if nothing specific is defined on class or method level.com.fasterxml.jackson.annotation.JsonInclude.IncludegetDefaultPropertyInclusion()Attribute can be used to define which properties should be included when an object is serialized to JSON.com.fasterxml.jackson.annotation.JsonAutoDetect.VisibilitygetDefaultSetterVisibility()Method returns the default setter visibility that should be used by an object mapper if nothing specific is defined on class or method level.com.fasterxml.jackson.databind.DeserializationFeature[]getDisabledDeserializationFeatures()Method returns the list of deserialization features that should be disabled explicitly.com.fasterxml.jackson.databind.MapperFeature[]getDisabledMapperFeatures()Method returns the list of mapper features that should be disabled explicitly.com.fasterxml.jackson.databind.SerializationFeature[]getDisabledSerializationFeatures()Method returns the list of serialization features that should be disabled explicitly.com.anaptecs.jeaf.json.annotations.ObjectMapperConfiggetEmptyConfiguration()com.fasterxml.jackson.databind.DeserializationFeature[]getEnabledDeserializationFeatures()Method returns the list of deserialization features that should be enabled explicitly.com.fasterxml.jackson.databind.MapperFeature[]getEnabledMapperFeatures()Method returns the list of mapper features that should be enabled explicitly.com.fasterxml.jackson.databind.SerializationFeature[]getEnabledSerializationFeatures()Method returns the list of serialization features that should be enabled explicitly.java.util.List<com.anaptecs.jeaf.json.api.ObjectMapperModuleFactory>getObjectMapperModuleFactories()-
Methods inherited from class com.anaptecs.jeaf.xfun.api.config.AnnotationBasedConfiguration
asList, asList, asList, asList, asList, asList, asList, asList, getConfigurationClass, getConfigurationErrors, isCustomConfigurationAvailable, isDefaultConfigurationAvailable, newInstance, newInstance, newInstances, tryNewInstance
-
-
-
-
Constructor Detail
-
ObjectMapperConfiguration
public ObjectMapperConfiguration()
Initialize object. During initialization configurations will be loaded.
-
ObjectMapperConfiguration
public ObjectMapperConfiguration(java.lang.String pResourceName, java.lang.String pConfigurationBasePath, boolean pExceptionOnError)Initialize object. During initialization configurations will be loaded.- Parameters:
pCustomConfigurationResourceName- Name of the file which contains the class name of the custom configuration class. The parameter must not be null.pBasePackagePath- Path under which the file should be found in the classpath. The parameter may be null.pExceptionOnError- If parameter is set to true then an exception will be thrown in case of configuration errors.
-
-
Method Detail
-
getAnnotationClass
protected java.lang.Class<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig> getAnnotationClass()
- Specified by:
getAnnotationClassin classcom.anaptecs.jeaf.xfun.api.config.AnnotationBasedConfiguration<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig>
-
getDefaultConfigurationClass
protected java.lang.String getDefaultConfigurationClass()
- Specified by:
getDefaultConfigurationClassin classcom.anaptecs.jeaf.xfun.api.config.AnnotationBasedConfiguration<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig>
-
getEmptyConfiguration
public com.anaptecs.jeaf.json.annotations.ObjectMapperConfig getEmptyConfiguration()
- Specified by:
getEmptyConfigurationin classcom.anaptecs.jeaf.xfun.api.config.AnnotationBasedConfiguration<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig>
-
checkCustomConfiguration
public java.util.List<java.lang.String> checkCustomConfiguration(com.anaptecs.jeaf.json.annotations.ObjectMapperConfig pCustomConfiguration)
- Specified by:
checkCustomConfigurationin classcom.anaptecs.jeaf.xfun.api.config.AnnotationBasedConfiguration<com.anaptecs.jeaf.json.annotations.ObjectMapperConfig>
-
getDefaultFieldVisibility
public com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getDefaultFieldVisibility()
Method returns the default field visibility that should be used by an object mapper if nothing specific is defined on class or field level.- Returns:
JsonAutoDetect.VisibilityDefault field visibility. The method never returns null.
-
getDefaultGetterVisibility
public com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getDefaultGetterVisibility()
Method returns the default getter visibility that should be used by an object mapper if nothing specific is defined on class or method level.- Returns:
JsonAutoDetect.VisibilityDefault field visibility. The method never returns null.
-
getDefaultSetterVisibility
public com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getDefaultSetterVisibility()
Method returns the default setter visibility that should be used by an object mapper if nothing specific is defined on class or method level.- Returns:
JsonAutoDetect.VisibilityDefault field visibility. The method never returns null.
-
getDefaultCreatorVisibility
public com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getDefaultCreatorVisibility()
Method returns the default creator visibility that should be used by an object mapper if nothing specific is defined on class or method level.- Returns:
JsonAutoDetect.VisibilityDefault field visibility. The method never returns null.
-
getDefaultPropertyInclusion
public com.fasterxml.jackson.annotation.JsonInclude.Include getDefaultPropertyInclusion()
Attribute can be used to define which properties should be included when an object is serialized to JSON. By default all non empty attributes will be included. This settings differs from Jackson's default values in order to reduce content to what is really needed.
-
getEnabledMapperFeatures
public com.fasterxml.jackson.databind.MapperFeature[] getEnabledMapperFeatures()
Method returns the list of mapper features that should be enabled explicitly. This means that these features will be enabled in addition to all features that are enabled by default.- Returns:
ListList of all features that should be explicitly enabled. The method never returns null.
-
getDisabledMapperFeatures
public com.fasterxml.jackson.databind.MapperFeature[] getDisabledMapperFeatures()
Method returns the list of mapper features that should be disabled explicitly. This means that these features will be disabled in addition to all features that are disabled by default.- Returns:
ListList of all features that should be explicitly disabled. The method never returns null.
-
getEnabledSerializationFeatures
public com.fasterxml.jackson.databind.SerializationFeature[] getEnabledSerializationFeatures()
Method returns the list of serialization features that should be enabled explicitly. This means that these features will be enabled in addition to all features that are enabled by default.- Returns:
ListList of all features that should be explicitly enabled. The method never returns null.
-
getDisabledSerializationFeatures
public com.fasterxml.jackson.databind.SerializationFeature[] getDisabledSerializationFeatures()
Method returns the list of serialization features that should be disabled explicitly. This means that these features will be disabled in addition to all features that are disabled by default.- Returns:
ListList of all features that should be explicitly disabled. The method never returns null.
-
getEnabledDeserializationFeatures
public com.fasterxml.jackson.databind.DeserializationFeature[] getEnabledDeserializationFeatures()
Method returns the list of deserialization features that should be enabled explicitly. This means that these features will be enabled in addition to all features that are enabled by default.- Returns:
ListList of all features that should be explicitly enabled. The method never returns null.
-
getDisabledDeserializationFeatures
public com.fasterxml.jackson.databind.DeserializationFeature[] getDisabledDeserializationFeatures()
Method returns the list of deserialization features that should be disabled explicitly. This means that these features will be disabled in addition to all features that are disabled by default.- Returns:
ListList of all features that should be explicitly disabled. The method never returns null.
-
getObjectMapperModuleFactories
public java.util.List<com.anaptecs.jeaf.json.api.ObjectMapperModuleFactory> getObjectMapperModuleFactories()
-
-