Class AbstractFieldJsonSerializer

java.lang.Object
com.emc.documentum.rest.parser.json.writer.field.AbstractFieldJsonSerializer
All Implemented Interfaces:
AnnotatedFieldBindingProcessor, AnnotatedFieldSerializer<com.emc.documentum.rest.parser.json.writer.TypeJsonWriter>
Direct Known Subclasses:
DelayedFieldJsonSerializer, EntryFieldJsonSerializer, ListFieldJsonSerializer, MapFieldJsonSerializer, NullFieldJsonSerializer, ObjectFieldJsonSerializer, SimpleDataFieldJsonSerializer

public abstract class AbstractFieldJsonSerializer extends Object implements AnnotatedFieldSerializer<com.emc.documentum.rest.parser.json.writer.TypeJsonWriter>
This abstract class has default implementation for JSON field serializer. Also it contains JSON specified writer.
  • Constructor Details

    • AbstractFieldJsonSerializer

      public AbstractFieldJsonSerializer()
  • Method Details

    • serializeKeyValue

      public void serializeKeyValue(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, String key, Object value, org.springframework.http.MediaType contentType, com.emc.documentum.rest.config.BindingConfig bindingConfig)
      Serializes the object in a map as the entry value. This method must be implemented if the target object supports to be serialized in a map.
      Parameters:
      writer - message writer
      key - the serializable name of the field to serialize
      value - the object value to serialize
      contentType - content type of target representation
      bindingConfig - the binding configuration
    • serializeValue

      public void serializeValue(com.emc.documentum.rest.parser.json.writer.TypeJsonWriter writer, Object value)
      Serializes the object in a map as the entry value. This method must be implemented if the target object supports to be serialized in a list.
      Parameters:
      writer - message writer
      value - the object value to serialize
    • isCompatibleMediaType

      public boolean isCompatibleMediaType(org.springframework.http.MediaType mediaType)
      Description copied from interface: AnnotatedFieldBindingProcessor
      Check if the message serializer or deserializer is compatible with the specified media type.
      Specified by:
      isCompatibleMediaType in interface AnnotatedFieldBindingProcessor
      Parameters:
      mediaType - the media type to check
      Returns:
      true for compatible