-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving or removing unused traits (#1051)
- Loading branch information
1 parent
9f96469
commit 302a6e1
Showing
10 changed files
with
46 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
...mmon/src/main/scala/io/lenses/streamreactor/connect/cloud/common/traits/PropsParser.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...a-connect-jms/src/main/scala/io/lenses/streamreactor/connect/jms/config/UrlSettings.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2017-2024 Lenses.io Ltd | ||
* | ||
* Licensed 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 io.lenses.streamreactor.connect.jms.config | ||
|
||
/** | ||
* Created by [email protected] on 31/07/2017. | ||
* stream-reactor | ||
*/ | ||
|
||
import io.lenses.streamreactor.common.config.base.const.TraitConfigConst._ | ||
import io.lenses.streamreactor.common.config.base.traits.BaseSettings | ||
import org.apache.kafka.common.config.ConfigException | ||
|
||
trait UrlSettings extends BaseSettings { | ||
private val urlConst = s"$connectorPrefix.$URL_SUFFIX" | ||
|
||
def getUrl: String = { | ||
val url = getString(urlConst) | ||
if (url == null || url.trim.isEmpty) { | ||
throw new ConfigException(s"$urlConst has not been set") | ||
} | ||
url | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,31 +13,19 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.lenses.streamreactor.common.config.base.traits | ||
package io.lenses.streamreactor.connect.mqtt.config | ||
|
||
/** | ||
* Created by [email protected] on 31/07/2017. | ||
* stream-reactor | ||
*/ | ||
|
||
import io.lenses.streamreactor.common.config.base.const.TraitConfigConst._ | ||
import io.lenses.streamreactor.common.config.base.traits.BaseSettings | ||
import org.apache.kafka.common.config.ConfigException | ||
|
||
trait ConnectionSettings extends BaseSettings { | ||
val urlConst = s"$connectorPrefix.$URL_SUFFIX" | ||
val hostConst = s"$connectorPrefix.$CONNECTION_HOST_SUFFIX" | ||
val hostsConst = s"$connectorPrefix.$CONNECTION_HOSTS_SUFFIX" | ||
val portConst = s"$connectorPrefix.$CONNECTION_PORT_SUFFIX" | ||
|
||
def getPort = getInt(portConst) | ||
|
||
def getUrl: String = { | ||
val url = getString(urlConst) | ||
if (url == null || url.trim.isEmpty) { | ||
throw new ConfigException(s"$urlConst has not been set") | ||
} | ||
url | ||
} | ||
trait HostSettings extends BaseSettings { | ||
private val hostsConst = s"$connectorPrefix.$CONNECTION_HOSTS_SUFFIX" | ||
|
||
def getHosts: String = { | ||
val connection = getString(hostsConst) | ||
|
@@ -48,12 +36,4 @@ trait ConnectionSettings extends BaseSettings { | |
connection | ||
} | ||
|
||
def getHost: String = { | ||
val connection = getString(hostConst) | ||
|
||
if (connection == null || connection.trim.isEmpty) { | ||
throw new ConfigException(s"$hostsConst is not provided!") | ||
} | ||
connection | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters