Pivot
  1. Pivot
  2. PIVOT-308

QueryServlet.setSerializerClass is not very extensible

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: web
    • Labels:
      None

      Description

      Since QueryServlet instantiates the serializer automatically based on the serializer class, it precludes callers from using serializers that maintain state of any kind. Specifically, QueryServlet cannot be used with CSVSerializer, since CSVSerializer requires the setup of keys.

      We should simply provide an abstract newSerializer() method that subclasses implement to return an appropriate serializer. A private concrete method of the same name already exists and uses Class.newInstance() to return the serializer.

      NOTE: This change will constitute an API change for subclasses of QueryServlet – instead of using serializerClass, they'll have to implement newSerializer().

        Activity

        Todd Volkert created issue -
        Todd Volkert made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Todd Volkert
            Reporter:
            Todd Volkert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development