Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-308

QueryServlet.setSerializerClass is not very extensible

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: 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().

        Attachments

          Activity

            People

            • Assignee:
              tvolkert Todd Volkert
              Reporter:
              tvolkert Todd Volkert

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment