public class MemosChangeNotificationClient extends Object implements NotificationClient
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_SOURCE_NAME |
static String |
JOURNAL_MEMO_EVENT |
static String |
MEMO_ALARMID_PARAM |
static String |
MEMO_AUTHOR_PARAM |
static String |
MEMO_BODY_PARAM |
static String |
MEMO_REDUCTIONKEY_PARAM |
static String |
MEMO_VALUES_PARAM |
static String |
STICKY_MEMO_EVENT |
Constructor and Description |
---|
MemosChangeNotificationClient() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
EventProxy |
getEventProxy() |
void |
init() |
org.json.simple.JSONObject |
jsonMemoTimeNormaliser(org.json.simple.JSONObject jsonObject)
concerts all time values into a normalised time in memo json object from database
example timestamps to translate
{
"suppressedtime":"2016-08-04 16:11:16.01+01",
"suppresseduntil":"2016-08-04 16:11:16.01+01",
"lasteventtime":"2016-08-04 16:11:16.01+01",
"alarmacktime":"2016-08-04 07:34:04.617+01",
"firsteventtime":"2016-08-04 16:11:16.01+01",
"firstautomationtime":"2016-08-04 16:12:03.272205+01",
"lastautomationtime":"2016-08-04 16:12:03.272205+01"
}
|
void |
sendDbNotification(DbNotification dbNotification) |
void |
setEventProxy(EventProxy eventProxy) |
String |
timeNormaliser(String dbTimeStr)
converts postgres json time format to normalised time format for matching to Elastic Search
date_optional_time or strict_date_optional_time
(A generic ISO datetime parser where the date is mandatory and the time is optional
see https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html#strict-date-time)
|
public static final String EVENT_SOURCE_NAME
public static final String STICKY_MEMO_EVENT
public static final String JOURNAL_MEMO_EVENT
public static final String MEMO_VALUES_PARAM
public static final String MEMO_ALARMID_PARAM
public static final String MEMO_BODY_PARAM
public static final String MEMO_AUTHOR_PARAM
public static final String MEMO_REDUCTIONKEY_PARAM
public EventProxy getEventProxy()
public void setEventProxy(EventProxy eventProxy)
public void sendDbNotification(DbNotification dbNotification)
sendDbNotification
in interface NotificationClient
public org.json.simple.JSONObject jsonMemoTimeNormaliser(org.json.simple.JSONObject jsonObject)
jsonObject
- public String timeNormaliser(String dbTimeStr)
dbTimeStr
- public void init()
init
in interface NotificationClient
public void destroy()
destroy
in interface NotificationClient
Copyright © 2017. All rights reserved.