com.ibm.tivoli.maximo.miniapps.treegrid

Class StreamingDataBuilder

  • java.lang.Object
    • com.ibm.tivoli.maximo.miniapps.treegrid.StreamingDataBuilder
  • All Implemented Interfaces:
    TGJsonWriter, TreeGridUtil.ITGSerializationHelper


    public class StreamingDataBuilder
    extends java.lang.Object
    implements TGJsonWriter, TreeGridUtil.ITGSerializationHelper
    Streaming API for build large TreeGrid models. The begin/end methods have to used to denote the start/end of sections. set(name,value) can be used to set an object's value.
     StreamingDataBuilder data = new StreamingDataBuilder(resp.getWriter());
     data.beingBody();
     data.beginRow();
     data.set(TreeGrid.I.id, "ROOT");
     data.set("Test", "Root Row");
     data.beginItems();
     data.beginRow();
     data.set(TreeGrid.I.id, 1);
     data.set("Test", "Row 1");
     data.endRow();
     data.beginRow();
     data.set(TreeGrid.I.id, 2);
     data.set("Test", "Row 2");
     data.endRow();
     data.endItems();
     data.endRow();
     data.endBody();
     
     
    • Method Detail

      • beingBody

        public void beingBody()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • beginItems

        public void beginItems()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • endItems

        public void endItems()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • beginRow

        public void beginRow()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • endRow

        public void endRow()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • endBody

        public void endBody()
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        java.lang.String value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        java.lang.Number value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        int value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        long value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        float value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        double value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        boolean value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        java.util.Date value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • set

        public void set(java.lang.String name,
                        java.lang.Object value)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • name

        public TGJsonWriter name(java.lang.String name)
                          throws java.io.IOException
        Specified by:
        name in interface TGJsonWriter
        Throws:
        java.io.IOException
      • value

        public TGJsonWriter value(boolean value)
                           throws java.io.IOException
        Specified by:
        value in interface TGJsonWriter
        Throws:
        java.io.IOException
      • value

        public TGJsonWriter value(double value)
                           throws java.io.IOException
        Specified by:
        value in interface TGJsonWriter
        Throws:
        java.io.IOException
      • value

        public TGJsonWriter value(long value)
                           throws java.io.IOException
        Specified by:
        value in interface TGJsonWriter
        Throws:
        java.io.IOException
      • value

        public TGJsonWriter value(java.lang.Number value)
                           throws java.io.IOException
        Specified by:
        value in interface TGJsonWriter
        Throws:
        java.io.IOException
      • value

        public TGJsonWriter value(java.lang.String value)
                           throws java.io.IOException
        Specified by:
        value in interface TGJsonWriter
        Throws:
        java.io.IOException