Class SeverityCountsReducer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<SeverityCount>
tenapull.data.deserialize.SeverityCountsReducer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class SeverityCountsReducer
extends com.fasterxml.jackson.databind.JsonSerializer<SeverityCount>
Serializer for simplifying the list of SeverityLevelCount beans into a series of single text values, used for serializing the output.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

    com.fasterxml.jackson.databind.JsonSerializer.None
  • Constructor Summary

    Constructors 
    Constructor Description
    SeverityCountsReducer()  
  • Method Summary

    Modifier and Type Method Description
    void serialize​(SeverityCount sc, com.fasterxml.jackson.core.JsonGenerator jg, com.fasterxml.jackson.databind.SerializerProvider sp)
    Converts a SeverityCount's list of SeverityLevelCounts into a series of text fields, with a key of "level_#" (where # represents the level value of the SeverityLevelCount) and a value taken from the "count" field representing the SeverityLevelCount

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId

    Methods inherited from class java.lang.Object

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

  • Method Details

    • serialize

      public void serialize​(SeverityCount sc, com.fasterxml.jackson.core.JsonGenerator jg, com.fasterxml.jackson.databind.SerializerProvider sp) throws java.io.IOException
      Converts a SeverityCount's list of SeverityLevelCounts into a series of text fields, with a key of "level_#" (where # represents the level value of the SeverityLevelCount) and a value taken from the "count" field representing the SeverityLevelCount
      Specified by:
      serialize in class com.fasterxml.jackson.databind.JsonSerializer<SeverityCount>
      Parameters:
      sc - the SeverityCount wrapper which contains the list of SeverityLevelCounts
      jg -
      sp -
      Throws:
      java.io.IOException