This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch STREAMPIPES-319
in repository 
https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git

commit 2647b975d318262c61ae33d7c7e126d1875c513f
Author: Dominik Riemer <[email protected]>
AuthorDate: Tue Jul 13 11:07:25 2021 +0200

    [STREAMPIPES-319] Remove config provider of notifications service
---
 .../jvm/SinksNotificationsJvmInit.java             |   2 +-
 .../sinks/notifications/jvm/config/ConfigKeys.java |   8 --
 .../jvm/config/SinksNotificationsJvmConfig.java    | 109 ---------------------
 3 files changed, 1 insertion(+), 118 deletions(-)

diff --git 
a/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/SinksNotificationsJvmInit.java
 
b/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/SinksNotificationsJvmInit.java
index e5aa4a4..20c94ac 100644
--- 
a/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/SinksNotificationsJvmInit.java
+++ 
b/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/SinksNotificationsJvmInit.java
@@ -45,7 +45,7 @@ public class SinksNotificationsJvmInit extends 
StandaloneModelSubmitter {
     return 
SpServiceDefinitionBuilder.create("org.apache.streampipes.sinks.notifications.jvm",
             "Sinks Notifications JVM",
             "",
-            8096)
+            8090)
             .registerPipelineElements(
                     new EmailController(),
                     new OneSignalController(),
diff --git 
a/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/ConfigKeys.java
 
b/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/ConfigKeys.java
index 2726cfd..f69d0a7 100644
--- 
a/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/ConfigKeys.java
+++ 
b/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/ConfigKeys.java
@@ -19,14 +19,6 @@
 package org.apache.streampipes.sinks.notifications.jvm.config;
 
 public class ConfigKeys {
-    public static final String SLACK_NOT_INITIALIZED = "SLACK_NOT_INITIALIZED";
-
-    final static String HOST = "SP_HOST";
-    final static String PORT = "SP_PORT";
-    final static String ICON_HOST = "SP_ICON_HOST";
-    final static String ICON_PORT = "SP_ICON_PORT";
-    final static String SERVICE_NAME = "SP_SERVICE_NAME";
-
     public final static String EMAIL_FROM = "SP_EMAIL_FROM";
     public final static String EMAIL_USERNAME = "SP_EMAIL_USERNAME";
     public final static String EMAIL_PASSWORD = "SP_EMAIL_PASSWORD";
diff --git 
a/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/SinksNotificationsJvmConfig.java
 
b/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/SinksNotificationsJvmConfig.java
deleted file mode 100644
index 7c9016d..0000000
--- 
a/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/config/SinksNotificationsJvmConfig.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.streampipes.sinks.notifications.jvm.config;
-
-
-import org.apache.streampipes.svcdiscovery.SpServiceDiscovery;
-import org.apache.streampipes.svcdiscovery.api.SpConfig;
-import org.apache.streampipes.container.model.PeConfig;
-
-public enum SinksNotificationsJvmConfig implements PeConfig {
-  INSTANCE;
-
-  private SpConfig config;
-
-  public final static String serverUrl;
-
-  private final static String service_id = 
"pe/org.apache.streampipes.sinks.notifications.jvm";
-  private final static String service_name = "Sinks Notifications JVM";
-  private final static String service_container_name = 
"sinks-notifications-jvm";
-
-
-  SinksNotificationsJvmConfig() {
-    config = SpServiceDiscovery.getSpConfig(service_id);
-    config.register(ConfigKeys.HOST, service_container_name, "Hostname for the 
notifications module");
-    config.register(ConfigKeys.PORT, 8090, "Port for the pe esper");
-
-    config.register(ConfigKeys.EMAIL_FROM, "", "The Email adress which send 
from");
-    config.register(ConfigKeys.EMAIL_USERNAME, "", "The username of the email 
account");
-    config.registerPassword(ConfigKeys.EMAIL_PASSWORD, "", "The password of 
the email account");
-    config.register(ConfigKeys.EMAIL_SMTP_HOST, "", "The SMTP Host");
-    config.register(ConfigKeys.EMAIL_SMTP_PORT, "", "The SMTP Port");
-    config.register(ConfigKeys.EMAIL_STARTTLS, false, "Use startls?");
-    config.register(ConfigKeys.EMAIL_SLL, false, "Use SLL?");
-    config.register(ConfigKeys.WEBSOCKET_PROTOCOL, "ws", "");
-
-    config.register(ConfigKeys.SERVICE_NAME, service_name, "The name of the 
service");
-
-  }
-
-  static {
-    serverUrl = SinksNotificationsJvmConfig.INSTANCE.getHost() + ":" + 
SinksNotificationsJvmConfig.INSTANCE.getPort();
-  }
-
-  @Override
-  public String getHost() {
-    return config.getString(ConfigKeys.HOST);
-  }
-
-  @Override
-  public int getPort() {
-    return config.getInteger(ConfigKeys.PORT);
-  }
-
-  public String getEmailFrom() {
-    return config.getString(ConfigKeys.EMAIL_FROM);
-  }
-
-  public String getEmailUsername() {
-    return config.getString(ConfigKeys.EMAIL_USERNAME);
-  }
-
-  public String getEmailPassword() {
-    return config.getString(ConfigKeys.EMAIL_PASSWORD);
-  }
-
-  public String getEmailSmtpHost() {
-    return config.getString(ConfigKeys.EMAIL_SMTP_HOST);
-  }
-
-  public int getEmailSmtpPort() {
-    return config.getInteger(ConfigKeys.EMAIL_SMTP_PORT);
-  }
-
-  public boolean useEmailStarttls() {
-    return config.getBoolean(ConfigKeys.EMAIL_STARTTLS);
-  }
-
-  public boolean useEmailSll() {
-    return config.getBoolean(ConfigKeys.EMAIL_SLL);
-  }
-
-  @Override
-  public String getId() {
-    return service_id;
-  }
-
-  @Override
-  public String getName() {
-    return config.getString(ConfigKeys.SERVICE_NAME);
-  }
-
-
-}

Reply via email to