Package com.onenetwork.platform.data.tlv
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.
-
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
-
Field Details
-
Constructor Details
-
BaseTimelineViewListener
public BaseTimelineViewListener()
-
-
Method Details
-
setPlatformUserContext
This will be called automatically by the framework to provide the context of the user invoking the Timeline -
postProcessTimeline
Called after TimelineView is executed. This allows you to manipulate the Timeline object like modifyDataMeasure
andBucket
values- Parameters:
timeline
-Timeline
-
postProcessTimelineJSON
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
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
Called after the Timeline view is exported to excel, before it is streamed back to the client. This allows you to manipulate theWorkbook
, for example re-sizing the width of cells or altering the color of cells.- Parameters:
timeline
-Timeline
workbook
-Workbook
-