Class TridionFieldTypeIdResolver

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsontype.TypeIdResolver

    public class TridionFieldTypeIdResolver
    extends Object
    implements com.fasterxml.jackson.databind.jsontype.TypeIdResolver
    Resolves Tridion Field Types to their proper concrete classes, which are subclasses of the abstract BaseField class. This is done based on the "FieldType" parameter which is sent by the DD4T templating assembly for each serialized Tridion Field.
    Author:
    R. Kempees
    • Constructor Detail

      • TridionFieldTypeIdResolver

        public TridionFieldTypeIdResolver()
    • Method Detail

      • init

        public void init​(com.fasterxml.jackson.databind.JavaType javaType)
        Specified by:
        init in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
      • idFromValue

        public String idFromValue​(Object o)
        Specified by:
        idFromValue in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
      • idFromValueAndType

        public String idFromValueAndType​(Object o,
                                         Class<?> aClass)
        Specified by:
        idFromValueAndType in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
      • idFromBaseType

        public String idFromBaseType()
        Specified by:
        idFromBaseType in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
      • typeFromId

        public com.fasterxml.jackson.databind.JavaType typeFromId​(String s)
      • typeFromId

        public com.fasterxml.jackson.databind.JavaType typeFromId​(com.fasterxml.jackson.databind.DatabindContext databindContext,
                                                                  String s)
        Specified by:
        typeFromId in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
      • getDescForKnownTypeIds

        public String getDescForKnownTypeIds()
        Specified by:
        getDescForKnownTypeIds in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
      • getMechanism

        public com.fasterxml.jackson.annotation.JsonTypeInfo.Id getMechanism()
        Specified by:
        getMechanism in interface com.fasterxml.jackson.databind.jsontype.TypeIdResolver
      • getClassForKey

        public static String getClassForKey​(String type)