From b86161aacf53a0f66dba43ee4933bf4c8e17f072 Mon Sep 17 00:00:00 2001 From: Shinryuken Date: Mon, 13 Nov 2017 21:38:17 +0100 Subject: removing NotificationFormatter from EventForwarder --- src/org/traccar/notification/EventForwarder.java | 5 ----- src/org/traccar/notification/FormTypeEventForwarder.java | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/notification/EventForwarder.java b/src/org/traccar/notification/EventForwarder.java index 4e5d75d68..c21799d74 100644 --- a/src/org/traccar/notification/EventForwarder.java +++ b/src/org/traccar/notification/EventForwarder.java @@ -39,7 +39,6 @@ public abstract class EventForwarder { private String header; private final String payloadParamName; private final String additionalParams; - private final boolean useTemplatesForPayload; private final boolean prettyPrinted; public EventForwarder() { @@ -47,7 +46,6 @@ public abstract class EventForwarder { header = Context.getConfig().getString("event.forward.header", ""); payloadParamName = Context.getConfig().getString("event.forward.paramMode.payloadParamName", "payload"); additionalParams = Context.getConfig().getString("event.forward.paramMode.additionalParams", ""); - useTemplatesForPayload = Context.getConfig().getBoolean("event.forward.paramMode.useTemplatesForPayload"); prettyPrinted = Context.getConfig().getBoolean("event.forward.prettyPrintedPayload"); } @@ -127,9 +125,6 @@ public abstract class EventForwarder { protected String getAdditionalParams() { return additionalParams; } - protected boolean isUseTemplatesForPayload() { - return useTemplatesForPayload; - } protected boolean isPrettyPrinted() { return prettyPrinted; } diff --git a/src/org/traccar/notification/FormTypeEventForwarder.java b/src/org/traccar/notification/FormTypeEventForwarder.java index e7564885d..dede95707 100644 --- a/src/org/traccar/notification/FormTypeEventForwarder.java +++ b/src/org/traccar/notification/FormTypeEventForwarder.java @@ -18,11 +18,7 @@ public class FormTypeEventForwarder extends EventForwarder { requestBuilder.setFormParams(splitParams(getAdditionalParams(), "=")); } - String payload = isUseTemplatesForPayload() - ? NotificationFormatter.formatForwarderMessage(event, position) - : prepareJsonPayload(event, position); - - requestBuilder.addFormParam(getPayloadParamName(), payload); + requestBuilder.addFormParam(getPayloadParamName(), prepareJsonPayload(event, position)); } } -- cgit v1.2.3