Uses of Class
com.fasterxml.jackson.databind.jsontype.PolymorphicTypeValidator
Packages that use PolymorphicTypeValidator
Package
Description
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.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).Package that contains interfaces that define how to implement
functionality for dynamically resolving type during deserialization.
Package that contains standard implementations for
TypeResolverBuilder
and
TypeIdResolver.-
Uses of PolymorphicTypeValidator in com.fasterxml.jackson.databind
Fields in com.fasterxml.jackson.databind declared as PolymorphicTypeValidatorModifier and TypeFieldDescriptionprotected final PolymorphicTypeValidatorObjectMapper.DefaultTypeResolverBuilder._subtypeValidatorPolymorphicTypeValidatortop 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 PolymorphicTypeValidatorModifier and TypeMethodDescriptionObjectMapper.getPolymorphicTypeValidator()Accessor for configuredPolymorphicTypeValidatorused for validating polymorphic subtypes used with explicit polymorphic types (annotation-based), but NOT one with "default typing" (seeObjectMapper.activateDefaultTyping(PolymorphicTypeValidator)for details).ObjectMapper.DefaultTypeResolverBuilder.subTypeValidator(MapperConfig<?> config) Methods in com.fasterxml.jackson.databind with parameters of type PolymorphicTypeValidatorModifier and TypeMethodDescriptionprotected 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 customTypeResolverBuildersubtypes.protected <T> TDatabindContext._throwSubtypeClassNotAllowed(JavaType baseType, String subType, PolymorphicTypeValidator ptv) protected <T> TDatabindContext._throwSubtypeNameNotAllowed(JavaType baseType, String subType, PolymorphicTypeValidator ptv) ObjectMapper.activateDefaultTyping(PolymorphicTypeValidator ptv) Convenience method that is equivalent to callingObjectMapper.activateDefaultTyping(PolymorphicTypeValidator ptv, ObjectMapper.DefaultTyping applicability) Convenience method that is equivalent to callingObjectMapper.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.activateDefaultTypingAsProperty(PolymorphicTypeValidator ptv, ObjectMapper.DefaultTyping applicability, 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)ObjectMapper.DefaultTypeResolverBuilder.construct(ObjectMapper.DefaultTyping t, PolymorphicTypeValidator ptv) DatabindContext.resolveAndValidateSubType(JavaType baseType, String subClass, PolymorphicTypeValidator ptv) Lookup method similar toDatabindContext.resolveSubType(JavaType, String)but one that also validates that resulting subtype is valid according to givenPolymorphicTypeValidator.ObjectMapper.setPolymorphicTypeValidator(PolymorphicTypeValidator ptv) Method for specifyingPolymorphicTypeValidatorto 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 PolymorphicTypeValidatorModifierConstructorDescription -
Uses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.cfg
Fields in com.fasterxml.jackson.databind.cfg declared as PolymorphicTypeValidatorModifier and TypeFieldDescriptionprotected final PolymorphicTypeValidatorBaseSettings._typeValidatorValidator 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 PolymorphicTypeValidatorModifier and TypeMethodDescriptionBaseSettings.getPolymorphicTypeValidator()MapperConfig.getPolymorphicTypeValidator()Simple accessor for defaultPolymorphicTypeValidatorto use for legacy Default Typing methods (ObjectMapper.enableDefaultTyping()) and annotation based enabling.Methods in com.fasterxml.jackson.databind.cfg with parameters of type PolymorphicTypeValidatorModifier and TypeMethodDescriptionMapperBuilder.activateDefaultTyping(PolymorphicTypeValidator subtypeValidator) Convenience method that is equivalent to callingMapperBuilder.activateDefaultTyping(PolymorphicTypeValidator subtypeValidator, ObjectMapper.DefaultTyping dti) Convenience method that is equivalent to callingMapperBuilder.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).MapperBuilder.activateDefaultTypingAsProperty(PolymorphicTypeValidator subtypeValidator, ObjectMapper.DefaultTyping applicability, 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)MapperBuilder.polymorphicTypeValidator(PolymorphicTypeValidator ptv) Method for assigningPolymorphicTypeValidatorto 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.with(PolymorphicTypeValidator v) Constructors in com.fasterxml.jackson.databind.cfg with parameters of type PolymorphicTypeValidatorModifierConstructorDescriptionBaseSettings(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, com.fasterxml.jackson.core.Base64Variant defaultBase64, PolymorphicTypeValidator ptv) Deprecated.BaseSettings(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, com.fasterxml.jackson.core.Base64Variant defaultBase64, PolymorphicTypeValidator ptv, AccessorNamingStrategy.Provider accNaming) Deprecated.BaseSettings(ClassIntrospector ci, AnnotationIntrospector ai, PropertyNamingStrategy pns, TypeFactory tf, TypeResolverBuilder<?> typer, DateFormat dateFormat, HandlerInstantiator hi, Locale locale, TimeZone tz, com.fasterxml.jackson.core.Base64Variant defaultBase64, PolymorphicTypeValidator ptv, AccessorNamingStrategy.Provider accNaming, CacheProvider cacheProvider) -
Uses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.jsontype
Subclasses of PolymorphicTypeValidator in com.fasterxml.jackson.databind.jsontypeModifier and TypeClassDescriptionclassStandardBasicPolymorphicTypeValidatorimplementation 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.classPolymorphicTypeValidatorthat will only allow polymorphic handling if the base type is NOT one of potential dangerous base types (seeDefaultBaseTypeLimitingValidator.isUnsafeBaseType(MapperConfig, JavaType)for specific list of such base types).static classShared 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.implModifier and TypeClassDescriptionfinal classDefaultPolymorphicTypeValidatorused unless explicit one is constructed (and, in 2.11,MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPESnot enabled).Fields in com.fasterxml.jackson.databind.jsontype.impl declared as PolymorphicTypeValidatorModifier and TypeFieldDescriptionprotected final PolymorphicTypeValidatorClassNameIdResolver._subTypeValidatorMethods in com.fasterxml.jackson.databind.jsontype.impl that return PolymorphicTypeValidatorModifier and TypeMethodDescriptionprotected PolymorphicTypeValidatorStdTypeResolverBuilder.reportInvalidBaseType(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator ptv) StdTypeResolverBuilder.subTypeValidator(MapperConfig<?> config) Overridable helper method for determining actual validator to use when constructing type serializers and type deserializers.protected PolymorphicTypeValidatorStdTypeResolverBuilder.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 PolymorphicTypeValidatorModifier and TypeMethodDescriptionstatic ClassNameIdResolverClassNameIdResolver.construct(JavaType baseType, MapperConfig<?> config, PolymorphicTypeValidator ptv) static MinimalClassNameIdResolverMinimalClassNameIdResolver.construct(JavaType baseType, MapperConfig<?> config, PolymorphicTypeValidator ptv) protected TypeIdResolverStdTypeResolverBuilder.idResolver(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator subtypeValidator, 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 PolymorphicTypeValidatorStdTypeResolverBuilder.reportInvalidBaseType(MapperConfig<?> config, JavaType baseType, PolymorphicTypeValidator ptv) Constructors in com.fasterxml.jackson.databind.jsontype.impl with parameters of type PolymorphicTypeValidatorModifierConstructorDescriptionClassNameIdResolver(JavaType baseType, TypeFactory typeFactory, PolymorphicTypeValidator ptv) protectedMinimalClassNameIdResolver(JavaType baseType, TypeFactory typeFactory, PolymorphicTypeValidator ptv)
CacheProviderinstead.