Class BaseTimelineViewListener

java.lang.Object
com.onenetwork.platform.data.tlv.BaseTimelineViewListener

public class BaseTimelineViewListener
extends java.lang.Object
A listener class for Timeline that will be called at different stages:
  • After Timeline view is executed successfully and the response is created
  • After a Timeline export process is done and the excel Workbook is created.
Subclasses are free to override only the methods they need.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected PlatformUserContext platformContext  
  • Constructor Summary

    Constructors 
    Constructor Description
    BaseTimelineViewListener()  
  • Method Summary

    Modifier and Type Method Description
    void postProcessExport​(Timeline timeline, org.apache.poi.ss.usermodel.Workbook workbook)
    Called after the Timeline view is exported to excel, before it is streamed back to the client.
    void postProcessTimeline​(Timeline timeline)
    Called after TimelineView is executed.
    void postProcessTimelineJSON​(Timeline timeline, org.json.JSONObject timelineObj)
    Called after TimelineView is executed but before the TLV is rendered in the page as JSON.
    void postSaveTimelineJSON​(Timeline timeline, org.json.JSONObject timelineObj)
    Called after DMs are successfully saved.
    void setPlatformUserContext​(PlatformUserContext platformContext)
    This will be called automatically by the framework to provide the context of the user invoking the Timeline

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • setPlatformUserContext

      public void setPlatformUserContext​(PlatformUserContext platformContext)
      This will be called automatically by the framework to provide the context of the user invoking the Timeline
    • postProcessTimeline

      public void postProcessTimeline​(Timeline timeline)
      Called after TimelineView is executed. This allows you to manipulate the Timeline object like modify DataMeasure and Bucket values
      Parameters:
      timeline - Timeline
    • postProcessTimelineJSON

      public void postProcessTimelineJSON​(Timeline timeline, org.json.JSONObject timelineObj)
      Called after TimelineView is executed but before the TLV is rendered in the page as JSON. This allows you to add extra data which you can then access on the client-side using a JS plugin.
      Parameters:
      timeline - Timeline
      timelineObj - JSONObject
    • postSaveTimelineJSON

      public void postSaveTimelineJSON​(Timeline timeline, org.json.JSONObject timelineObj)
      Called after DMs are successfully saved. This allows you to add extra data which you can then access on the client-side using a JS plugin.
      Parameters:
      timeline - Timeline
      timelineObj - JSONObject
    • postProcessExport

      public void postProcessExport​(Timeline timeline, org.apache.poi.ss.usermodel.Workbook workbook)
      Called after the Timeline view is exported to excel, before it is streamed back to the client. This allows you to manipulate the Workbook, for example re-sizing the width of cells or altering the color of cells.
      Parameters:
      timeline - Timeline
      workbook - Workbook