Class WrapperOverrideTypeModifier

java.lang.Object
com.fasterxml.jackson.databind.type.TypeModifier
com.broadleafcommerce.rest.api.WrapperOverrideTypeModifier
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class WrapperOverrideTypeModifier extends com.fasterxml.jackson.databind.type.TypeModifier implements org.springframework.context.ApplicationContextAware
Provides an implementation of a TypeModifier that looks up types in the application context for wrapper overrides. This allows for correct instantiation to occur when wrappers have been overridden and a client is actually sending JSON
Author:
Phillip Verheyden (phillipuniverse)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.context.ApplicationContext
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JavaType
    modifyType(com.fasterxml.jackson.databind.JavaType type, Type jdkType, com.fasterxml.jackson.databind.type.TypeBindings context, com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
  • Constructor Details

    • WrapperOverrideTypeModifier

      public WrapperOverrideTypeModifier()
  • Method Details

    • modifyType

      public com.fasterxml.jackson.databind.JavaType modifyType(com.fasterxml.jackson.databind.JavaType type, Type jdkType, com.fasterxml.jackson.databind.type.TypeBindings context, com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
      Specified by:
      modifyType in class com.fasterxml.jackson.databind.type.TypeModifier
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException