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

Make BXMLSerializer more extendable

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None

      Description

      If I want to extend BXMLSerializer, I need also to change static MimeTypes map on BXMLSerializer:

      For example:

      public class InjectingSerializer extends BXMLSerializer {

      static

      { BXMLSerializer.getMimeTypes().put(MIME_TYPE, InjectingSerializer.class); }

      ...

      May be the MimeTypes map should be instance variable and implicit mapping of MIME_TYPE should be this.getClass(), so one does not need to change mapping of MimeTypes when extending BXMLSerializer.

      May be implementation of AbstractFactory pattern for Pivot serializer should be considered.

        Attachments

          Activity

            People

            • Assignee:
              rwhitcomb Roger Lee Whitcomb
              Reporter:
              kaja78 Karel Hübl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: