Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add value for version parameter in adapter description #2206

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public IfmAlMqttAdapter() {
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, IfmAlMqttAdapter::new)
.create(ID, 0, IfmAlMqttAdapter::new)
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withCategory(AdapterType.Generic, AdapterType.Manufacturing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public List<Option> resolveOptions(String requestId,

@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, RosBridgeAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, RosBridgeAdapter::new)
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withCategory(AdapterType.Manufacturing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class MachineDataSimulatorAdapter implements StreamPipesAdapter {

@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, MachineDataSimulatorAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, MachineDataSimulatorAdapter::new)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withLocales(Locales.EN)
.withCategory(AdapterType.Debugging)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class FileReplayAdapter implements StreamPipesAdapter {

@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, FileReplayAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, FileReplayAdapter::new)
.withSupportedParsers(
new JsonParsers(),
new CsvParser(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private String extractRuntimeType(String type) {
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, HttpServerProtocol::new)
.create(ID, 0, HttpServerProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private InputStream getDataFromEndpoint() throws ParseException {
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, HttpStreamProtocol::new)
.create(ID, 0, HttpStreamProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withLocales(Locales.EN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class ImageStreamAdapter implements StreamPipesAdapter {

@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, ImageStreamAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, ImageStreamAdapter::new)
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.requiredIntegerParameter(Labels.withId(ImageZipUtils.INTERVAL_KEY))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public PollingSettings getPollingInterval() {

@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, IssAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, IssAdapter::new)
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withCategory(AdapterType.OpenData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class NetioMQTTAdapter implements StreamPipesAdapter {

@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, NetioMQTTAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, NetioMQTTAdapter::new)
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withCategory(AdapterType.Energy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private void applyConfiguration(IParameterExtractor extractor) {

@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, NetioRestAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, NetioRestAdapter::new)
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withCategory(AdapterType.Energy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class InfluxDbStreamAdapter implements StreamPipesAdapter {

@Override
public IAdapterConfiguration declareConfig() {
var builder = AdapterConfigurationBuilder.create(ID, InfluxDbStreamAdapter::new)
var builder = AdapterConfigurationBuilder.create(ID, 0, InfluxDbStreamAdapter::new)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withLocales(Locales.EN);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public IAdapterConfiguration declareConfig() {
latestAlternative.setSelected(true);

return AdapterConfigurationBuilder
.create(ID, KafkaProtocol::new)
.create(ID, 0, KafkaProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withLocales(Locales.EN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void applyConfiguration(IStaticPropertyExtractor extractor) {
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, MqttProtocol::new)
.create(ID, 0, MqttProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static StaticPropertyAlternative getConnectionPropertiesAlternativesTwo()
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, NatsProtocol::new)
.create(ID, 0, NatsProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withCategory(AdapterType.Generic)
.withLocales(Locales.EN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void pullData() throws ExecutionException, RuntimeException, InterruptedE
boolean emptyValueReceived = false;
List<DataValue> returnValues =
response.get(this.getPollingInterval().value(), this.getPollingInterval().timeUnit());
if (returnValues.size() == 0) {
if (returnValues.isEmpty()) {
emptyValueReceived = true;
LOG.warn("Empty value object returned - event will not be sent");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,14 @@ public PollingSettings getPollingInterval() {
}

/**
* Describe the adapter adapter and define what user inputs are required. Currently users can just select one node,
* Describe the adapter and define what user inputs are required. Currently users can just select one node,
* this will be extended in the future
*
* @return description of adapter
*/
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder.create(ID, Plc4xModbusAdapter::new)
return AdapterConfigurationBuilder.create(ID, 0, Plc4xModbusAdapter::new)
.withLocales(Locales.EN)
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withCategory(AdapterType.Manufacturing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public StaticProperty resolveConfiguration(String staticPropertyInternalName, IS
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, PulsarProtocol::new)
.create(ID, 0, PulsarProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withLocales(Locales.EN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void applyConfiguration(IStaticPropertyExtractor extractor) {
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, RocketMQProtocol::new)
.create(ID, 0, RocketMQProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withLocales(Locales.EN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private static void shutdown(MessageSessionFactory messageSessionFactory, PushMe
@Override
public IAdapterConfiguration declareConfig() {
return AdapterConfigurationBuilder
.create(ID, TubeMQProtocol::new)
.create(ID, 0, TubeMQProtocol::new)
.withSupportedParsers(Parsers.defaultParsers())
.withAssets(Assets.DOCUMENTATION, Assets.ICON)
.withLocales(Locales.EN)
Expand Down
Loading