Details

    • Complexity:
      Medium

      Description

      Currently CustomDatatype has a render(String referenceString, String view) method. Datatypes are at the API level and really don't need to know about views.

      The one thing we really do want to be able to do is to rapidly render a summary view of a custom value.

      To do:

      • remove the render(String, String) method from the CustomDatatype interface
      • remove it from all CustomDatatype implementations.
      • add a toSummary method, something like what is described below
      • implement toSummary in all CustomDatatype implementations.
        class Summary {
            private String summary;
            private boolean complete; // true means that summary is actually the complete view, false means it's simplified or truncated
            // getters, setters
        }
        
        interface CustomDatatype {
        
            ...
        
            /**
             * Returns a summary view that should fit in the given number of characters. (This is not a strict limit.)
             * Implementations of this method should return quickly, e.g. if this method is called thousands of times when rendering a table of items with custom values.
             */
            Summary toSummary(String referenceString, int suggestedMaxSize);
        }
        

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  darius Darius Jazayeri
                  Reporter:
                  darius Darius Jazayeri
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: