Uses of Class
com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator
-
Packages that use PolymorphicTypeValidator Package Description com.fasterxml.jackson.databind Basic data binding (mapping) functionality that allows for reading JSON content into Java Objects (POJOs) and JSON Trees (JsonNode
), as well as writing Java Objects and trees as JSON.com.fasterxml.jackson.databind.cfg Package that contains most of configuration-related classes; exception being couple of most-commonly used configuration things (like Feature enumerations) that are at the main level (com.fasterxml.jackson.databind
).com.fasterxml.jackson.databind.jsontype Package that contains interfaces that define how to implement functionality for dynamically resolving type during deserialization.com.fasterxml.jackson.databind.jsontype.impl Package that contains standard implementations forTypeResolverBuilder
andTypeIdResolver
. -
-
Uses of PolymorphicTypeValidator in com.fasterxml.jackson.databind
Fields in com.fasterxml.jackson.databind declared as PolymorphicTypeValidator Modifier and Type Field Description protected PolymorphicTypeValidator
ObjectMapper.DefaultTypeResolverBuilder. _subtypeValidator
PolymorphicTypeValidator
top use for validating that the subtypes resolved are valid for use (usually to protect against possible security issues)Methods in com.fasterxml.jackson.databind that return PolymorphicTypeValidator Modifier and Type Method Description PolymorphicTypeValidator
ObjectMapper. getPolymorphicTypeValidator()
Accessor for configuredPolymorphicTypeValidator
used for validating polymorphic subtypes used with explicit polymorphic types (annotation-based), but NOT one with "default typing" (seeObjectMapper.activateDefaultTyping(PolymorphicTypeValidator)
for details).PolymorphicTypeValidator
ObjectMapper.DefaultTypeResolverBuilder. subTypeValidator(MapperConfig<?> config)
Methods in com.fasterxml.jackson.databind with parameters of type PolymorphicTypeValidator Modifier and Type Method Description protected TypeResolverBuilder<?>
ObjectMapper. _constructDefaultTypeResolverBuilder(ObjectMapper.DefaultTyping applicability, PolymorphicTypeValidator ptv)
Overridable factory method, separate to allow format-specific mappers (and specifically XML-backed one, currently) to offer customTypeResolverBuilder
subtypes.protected <T> T
DatabindContext. _throwSubtypeClassNotAllowed(JavaType baseType, java.lang.String subType, PolymorphicTypeValidator ptv)
protected <T> T
DatabindContext. _throwSubtypeNameNotAllowed(JavaType baseType, java.lang.String subType, PolymorphicTypeValidator ptv)
ObjectMapper
ObjectMapper. activateDefaultTyping(PolymorphicTypeValidator ptv)
Convenience method that is equivalent to callingObjectMapper
ObjectMapper. activateDefaultTyping(PolymorphicTypeValidator ptv, ObjectMapper.DefaultTyping applicability)
Convenience method that is equivalent to callingObjectMapper
ObjectMapper. activateDefaultTyping(PolymorphicTypeValidator ptv, ObjectMapper.DefaultTyping applicability, com.fasterxml.jackson.annotation.JsonTypeInfo.As includeAs)
Method for enabling automatic inclusion of type information ("Default Typing"), needed for proper deserialization of polymorphic types (unless types have been annotated withJsonTypeInfo
).ObjectMapper
ObjectMapper. activateDefaultTypingAsProperty(PolymorphicTypeValidator ptv, ObjectMapper.DefaultTyping applicability, java.lang.String propertyName)
Method for enabling automatic inclusion of type information ("Default Typing") -- needed for proper deserialization of polymorphic types (unless types have been annotated withJsonTypeInfo
) -- using "As.PROPERTY" inclusion mechanism and specified property name to use for inclusion (default being "@class" since default type information always uses class name as type identifier)static ObjectMapper.DefaultTypeResolverBuilder
ObjectMapper.DefaultTypeResolverBuilder. construct(ObjectMapper.DefaultTyping t, PolymorphicTypeValidator ptv)
JavaType
DatabindContext. resolveAndValidateSubType(JavaType baseType, java.lang.String subClass, PolymorphicTypeValidator ptv)
Lookup method similar toDatabindContext.resolveSubType(com.fasterxml.jackson.databind.JavaType, java.lang.String)
but one that also validates that resulting subtype is valid according to givenPolymorphicTypeValidator
.ObjectMapper
ObjectMapper. setPolymorphicTypeValidator(PolymorphicTypeValidator ptv)
Method for specifyingPolymorphicTypeValidator
to use for validating polymorphic subtypes used with explicit polymorphic types (annotation-based), but NOT one with "default typing" (seeObjectMapper.activateDefaultTyping(PolymorphicTypeValidator)
for details).Constructors in com.fasterxml.jackson.databind with parameters of type PolymorphicTypeValidator Constructor Description DefaultTypeResolverBuilder(ObjectMapper.DefaultTyping t, PolymorphicTypeValidator ptv)
-
Uses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.cfg
Fields in com.fasterxml.jackson.databind.cfg declared as PolymorphicTypeValidator Modifier and Type Field Description protected PolymorphicTypeValidator
BaseSettings. _typeValidator
Validator that is used to limit allowed polymorphic subtypes, mostly for security reasons when dealing with untrusted content.Methods in com.fasterxml.jackson.databind.cfg that return PolymorphicTypeValidator Modifier and Type Method Description PolymorphicTypeValidator
BaseSettings. getPolymorphicTypeValidator()
PolymorphicTypeValidator
MapperConfig. getPolymorphicTypeValidator()
Simple accessor for defaultPolymorphicTypeValidator
to use for legacy Default Typing methods (ObjectMapper.enableDefaultTyping()
) and annotation based enabling.Methods in com.fasterxml.jackson.databind.cfg with parameters of type PolymorphicTypeValidator Modifier and Type Method Description B
MapperBuilder. activateDefaultTyping(PolymorphicTypeValidator subtypeValidator)
Convenience method that is equivalent to callingB
MapperBuilder. activateDefaultTyping(PolymorphicTypeValidator subtypeValidator, ObjectMapper.DefaultTyping dti)
Convenience method that is equivalent to callingB
MapperBuilder. activateDefaultTyping(PolymorphicTypeValidator subtypeValidator, ObjectMapper.DefaultTyping applicability, com.fasterxml.jackson.annotation.JsonTypeInfo.As includeAs)
Method for enabling automatic inclusion of type information, needed for proper deserialization of polymorphic types (unless types have been annotated withJsonTypeInfo
).B
MapperBuilder. activateDefaultTypingAsProperty(PolymorphicTypeValidator subtypeValidator, ObjectMapper.DefaultTyping applicability, java.lang.String propertyName)
Method for enabling automatic inclusion of type information -- needed for proper deserialization of polymorphic types (unless types have been annotated withJsonTypeInfo
) -- using "As.PROPERTY" inclusion mechanism and specified property name to use for inclusion (default being "@class" since default type information always uses class name as type identifier)B
MapperBuilder. polymorphicTypeValidator(PolymorphicTypeValidator ptv)
Method for assigningPolymorphicTypeValidator
to use for validating subtypes when using Class name - based polymorphic deserialization using annotations (validator used with "Default Typing" is specified by passing inMapperBuilder.activateDefaultTyping(PolymorphicTypeValidator)
instead).BaseSettings
BaseSettings. with(PolymorphicTypeValidator v)
Constructors in com.fasterxml.jackson.databind.cfg with parameters of type PolymorphicTypeValidator Constructor Description BaseSettings(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, java.text.DateFormat dateFormat, HandlerInstantiator hi, java.util.Locale locale, java.util.TimeZone tz, com.fasterxml.jackson.core.Base64Variant defaultBase64, PolymorphicTypeValidator ptv)
Deprecated.BaseSettings(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, java.text.DateFormat dateFormat, HandlerInstantiator hi, java.util.Locale locale, java.util.TimeZone tz, com.fasterxml.jackson.core.Base64Variant defaultBase64, PolymorphicTypeValidator ptv, AccessorNamingStrategy.Provider accNaming)
-
Uses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.jsontype
Subclasses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.jsontype Modifier and Type Class Description class
BasicPolymorphicTypeValidator
StandardBasicPolymorphicTypeValidator
implementation that users may want to use for constructing validators based on simple class hierarchy and/or name patterns to allow and/or deny certain subtypes.class
DefaultBaseTypeLimitingValidator
PolymorphicTypeValidator
that will only allow polymorphic handling if the base type is NOT one of potential dangerous base types (seeDefaultBaseTypeLimitingValidator.isUnsafeBaseType(com.fasterxml.jackson.databind.cfg.MapperConfig<?>, com.fasterxml.jackson.databind.JavaType)
for specific list of such base types).static class
PolymorphicTypeValidator.Base
Shared base class with partial implementation (with all validation calls returningPolymorphicTypeValidator.Validity.INDETERMINATE
) and convenience methods for indicating failure reasons. -
Uses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.jsontype.impl
Subclasses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.jsontype.impl Modifier and Type Class Description class
LaissezFaireSubTypeValidator
DefaultPolymorphicTypeValidator
used unless explicit one is constructed (and, in 2.11,MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES
not enabled).Fields in com.fasterxml.jackson.databind.jsontype.impl declared as PolymorphicTypeValidator Modifier and Type Field Description protected PolymorphicTypeValidator
ClassNameIdResolver. _subTypeValidator
Methods in com.fasterxml.jackson.databind.jsontype.impl that return PolymorphicTypeValidator Modifier and Type Method Description protected PolymorphicTypeValidator
StdTypeResolverBuilder. reportInvalidBaseType(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator ptv)
PolymorphicTypeValidator
StdTypeResolverBuilder. subTypeValidator(MapperConfig<?> config)
Overridable helper method for determining actual validator to use when constructing type serializers and type deserializers.protected PolymorphicTypeValidator
StdTypeResolverBuilder. verifyBaseTypeValidity(MapperConfig<?> config, JavaType baseType)
Helper method called to check that base type is valid regarding possible constraints on basetype/subtype combinations allowed for polymorphic type handling.Methods in com.fasterxml.jackson.databind.jsontype.impl with parameters of type PolymorphicTypeValidator Modifier and Type Method Description static ClassNameIdResolver
ClassNameIdResolver. construct(JavaType baseType, MapperConfig<?> config, PolymorphicTypeValidator ptv)
static MinimalClassNameIdResolver
MinimalClassNameIdResolver. construct(JavaType baseType, MapperConfig<?> config, PolymorphicTypeValidator ptv)
protected TypeIdResolver
StdTypeResolverBuilder. idResolver(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator subtypeValidator, java.util.Collection<NamedType> subtypes, boolean forSer, boolean forDeser)
Helper method that will either return configured custom type id resolver, or construct a standard resolver given configuration.protected PolymorphicTypeValidator
StdTypeResolverBuilder. reportInvalidBaseType(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator ptv)
Constructors in com.fasterxml.jackson.databind.jsontype.impl with parameters of type PolymorphicTypeValidator Constructor Description ClassNameIdResolver(JavaType baseType, TypeFactory typeFactory, PolymorphicTypeValidator ptv)
MinimalClassNameIdResolver(JavaType baseType, TypeFactory typeFactory, PolymorphicTypeValidator ptv)
-