diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-10-08 11:52:14 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-10-09 11:12:06 +0200 |
commit | 180f2967c7db5cbbace67616146a66d9d9658af7 (patch) | |
tree | 106a9019968b489ca717ddeb7a3e93f5328ac509 /aai-els-onap-logging/src | |
parent | 6cc66cadc9db495883ce1211c1a0f712e77f8bc7 (diff) |
Refactor UEBNotification class
- refactor UEBNotification class that it does not use ActiveMQ anymore
and directly publishes to Kafka
- use .domain.NotificationEvent class
- serialize as late as possible
Issue-ID: AAI-3931
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I3836519752f810f905a9aed96678d497783a2e5d
Diffstat (limited to 'aai-els-onap-logging/src')
-rw-r--r-- | aai-els-onap-logging/src/main/java/org/onap/aai/util/FormatDate.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/aai-els-onap-logging/src/main/java/org/onap/aai/util/FormatDate.java b/aai-els-onap-logging/src/main/java/org/onap/aai/util/FormatDate.java index 9ee2b71d..4243c539 100644 --- a/aai-els-onap-logging/src/main/java/org/onap/aai/util/FormatDate.java +++ b/aai-els-onap-logging/src/main/java/org/onap/aai/util/FormatDate.java @@ -27,21 +27,18 @@ import java.time.format.DateTimeFormatter; public class FormatDate { private final String timeZone; - private final String pattern; + private final DateTimeFormatter formatter ; public FormatDate(String pattern) { - this.pattern = pattern; - this.timeZone = "GMT"; + this(pattern, "GMT"); } public FormatDate(String pattern, String timeZone) { - this.pattern = pattern; this.timeZone = timeZone; + this.formatter = DateTimeFormatter.ofPattern(pattern); } public String getDateTime() { - - final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern); return formatter.format(ZonedDateTime.now(ZoneId.of(timeZone))); } } |