This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch cleanup-streampipes-model in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 4ff0fcff1b4a5f5264fde9f0613190ce4976f0da Author: Dominik Riemer <[email protected]> AuthorDate: Mon Jun 17 23:37:29 2024 +0200 chore: Remove unused code in streampipes-model module --- .../org/apache/streampipes/model/SpDataStream.java | 14 ---- .../model/base/ConsumableStreamPipesEntity.java | 10 --- .../model/base/InvocableStreamPipesEntity.java | 27 ------- .../model/base/NamedStreamPipesEntity.java | 24 ------ .../base/VersionedNamedStreamPipesEntity.java | 8 -- .../model/connect/adapter/AdapterDescription.java | 9 --- .../model/connect/grounding/ParserDescription.java | 22 ----- .../connect/grounding/ProtocolDescription.java | 12 --- .../model/graph/DataProcessorDescription.java | 38 --------- .../model/graph/DataProcessorInvocation.java | 39 --------- .../model/graph/DataSinkDescription.java | 12 --- .../model/graph/DataSinkInvocation.java | 16 ---- .../streampipes/model/labeling/Category.java | 80 ------------------ .../apache/streampipes/model/labeling/Label.java | 89 -------------------- .../monitoring/ElementStatusInfoSettings.java | 94 ---------------------- .../ContainerProvidedOptionsParameterRequest.java | 84 ------------------- .../template/PipelineTemplateDescription.java | 10 --- .../builder/AbstractPipelineElementBuilder.java | 9 --- .../extractor/AdapterParameterExtractorTest.java | 3 +- .../src/lib/model/gen/streampipes-model.ts | 80 +----------------- .../adapter-description.component.ts | 21 +---- 21 files changed, 4 insertions(+), 697 deletions(-) diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/SpDataStream.java b/streampipes-model/src/main/java/org/apache/streampipes/model/SpDataStream.java index 57510ffa01..118a6ebbb3 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/SpDataStream.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/SpDataStream.java @@ -40,25 +40,11 @@ public class SpDataStream extends NamedStreamPipesEntity { private int index; private String correspondingAdapterId; - public SpDataStream(String uri, String name, String description, String iconUrl, - EventGrounding eventGrounding, - EventSchema eventSchema) { - super(uri, name, description, iconUrl); - this.eventGrounding = eventGrounding; - this.eventSchema = eventSchema; - } - - public SpDataStream(String uri, String name, String description, EventSchema eventSchema) { - super(uri, name, description); - this.eventSchema = eventSchema; - } - public SpDataStream() { super(prefix + RandomStringUtils.randomAlphabetic(6)); this.eventSchema = new EventSchema(); } - public SpDataStream(SpDataStream other) { super(other); this.index = other.getIndex(); diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/base/ConsumableStreamPipesEntity.java b/streampipes-model/src/main/java/org/apache/streampipes/model/base/ConsumableStreamPipesEntity.java index e2fcb83f7d..3c763c15eb 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/base/ConsumableStreamPipesEntity.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/base/ConsumableStreamPipesEntity.java @@ -42,12 +42,6 @@ public abstract class ConsumableStreamPipesEntity extends VersionedNamedStreamPi this.staticProperties = new ArrayList<>(); } - public ConsumableStreamPipesEntity(String elementId, String name, String description, String iconUrl) { - super(elementId, name, description, iconUrl); - this.spDataStreams = new ArrayList<>(); - this.staticProperties = new ArrayList<>(); - } - public ConsumableStreamPipesEntity(ConsumableStreamPipesEntity other) { super(other); if (other.getSpDataStreams() != null) { @@ -75,10 +69,6 @@ public abstract class ConsumableStreamPipesEntity extends VersionedNamedStreamPi this.staticProperties = staticProperties; } - public boolean addEventStream(SpDataStream spDataStream) { - return spDataStreams.add(spDataStream); - } - public EventGrounding getSupportedGrounding() { return supportedGrounding; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java b/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java index 2f1fc8fa12..c18335797b 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/base/InvocableStreamPipesEntity.java @@ -23,7 +23,6 @@ import org.apache.streampipes.model.SpDataStream; import org.apache.streampipes.model.api.EndpointSelectable; import org.apache.streampipes.model.extensions.svcdiscovery.SpServiceTagPrefix; import org.apache.streampipes.model.grounding.EventGrounding; -import org.apache.streampipes.model.monitoring.ElementStatusInfoSettings; import org.apache.streampipes.model.staticproperty.StaticProperty; import org.apache.streampipes.model.util.Cloner; @@ -41,8 +40,6 @@ public abstract class InvocableStreamPipesEntity private String belongsTo; - private ElementStatusInfoSettings statusInfoSettings; - private EventGrounding supportedGrounding; private String correspondingPipeline; @@ -84,22 +81,6 @@ public abstract class InvocableStreamPipesEntity } } - public InvocableStreamPipesEntity( - String uri, - String name, - String description, - String iconUrl, - SpServiceTagPrefix serviceTagPrefix - ) { - super(uri, name, description, iconUrl); - this.serviceTagPrefix = serviceTagPrefix; - this.configured = false; - } - - public boolean addStaticProperty(StaticProperty staticProperty) { - return staticProperties.add(staticProperty); - } - public List<SpDataStream> getInputStreams() { return inputStreams; } @@ -158,14 +139,6 @@ public abstract class InvocableStreamPipesEntity this.configured = configured; } - public ElementStatusInfoSettings getStatusInfoSettings() { - return statusInfoSettings; - } - - public void setStatusInfoSettings(ElementStatusInfoSettings statusInfoSettings) { - this.statusInfoSettings = statusInfoSettings; - } - public String getCorrespondingUser() { return correspondingUser; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/base/NamedStreamPipesEntity.java b/streampipes-model/src/main/java/org/apache/streampipes/model/base/NamedStreamPipesEntity.java index 6ce1b32115..7c6c21129c 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/base/NamedStreamPipesEntity.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/base/NamedStreamPipesEntity.java @@ -53,7 +53,6 @@ public abstract class NamedStreamPipesEntity implements Serializable { protected List<String> connectedTo; private String name; private String description; - private String iconUrl; private String appId; private boolean includesAssets; private boolean includesLocales; @@ -73,26 +72,11 @@ public abstract class NamedStreamPipesEntity implements Serializable { this.elementId = elementId; } - public NamedStreamPipesEntity(String elementId, String name, String description, String iconUrl) { - this(elementId, name, description); - this.iconUrl = iconUrl; - } - - public NamedStreamPipesEntity(String elementId, String name, String description) { - super(); - this.elementId = elementId; - this.name = name; - this.description = description; - this.includedAssets = new ArrayList<>(); - this.includedLocales = new ArrayList<>(); - } - public NamedStreamPipesEntity(NamedStreamPipesEntity other) { this.elementId = other.getElementId(); this.rev = other.getRev(); this.description = other.getDescription(); this.name = other.getName(); - this.iconUrl = other.getIconUrl(); this.elementId = other.getElementId(); this.dom = other.getDom(); this.internallyManaged = other.isInternallyManaged(); @@ -124,14 +108,6 @@ public abstract class NamedStreamPipesEntity implements Serializable { this.description = description; } - public String getIconUrl() { - return iconUrl; - } - - public void setIconUrl(String iconUrl) { - this.iconUrl = iconUrl; - } - public String getDom() { return dom; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/base/VersionedNamedStreamPipesEntity.java b/streampipes-model/src/main/java/org/apache/streampipes/model/base/VersionedNamedStreamPipesEntity.java index 4d533eaf3e..43354f9764 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/base/VersionedNamedStreamPipesEntity.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/base/VersionedNamedStreamPipesEntity.java @@ -31,14 +31,6 @@ public abstract class VersionedNamedStreamPipesEntity extends NamedStreamPipesEn this.version = other.version; } - public VersionedNamedStreamPipesEntity(String elementId, String name, String description){ - super(elementId, name, description); - } - - public VersionedNamedStreamPipesEntity(String elementId, String name, String description, String iconUrl) { - super(elementId, name, description, iconUrl); - } - public int getVersion(){ return version; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java index 3d96406618..04c2d57be3 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/AdapterDescription.java @@ -89,15 +89,6 @@ public class AdapterDescription extends VersionedNamedStreamPipesEntity { this.setVersion(version); } - public AdapterDescription(String elementId, String name, String description) { - super(elementId, name, description); - this.rules = new ArrayList<>(); - this.category = new ArrayList<>(); - this.dataStream = new SpDataStream(); - this.deploymentConfiguration = new ExtensionDeploymentConfiguration(); - } - - public AdapterDescription(AdapterDescription other) { super(other); this.config = new Cloner().staticProperties(other.getConfig()); diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ParserDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ParserDescription.java index 87d7eca331..b45ee1e9fb 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ParserDescription.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ParserDescription.java @@ -20,11 +20,8 @@ package org.apache.streampipes.model.connect.grounding; import org.apache.streampipes.model.base.NamedStreamPipesEntity; -import org.apache.streampipes.model.staticproperty.StaticProperty; import org.apache.streampipes.model.staticproperty.StaticPropertyGroup; -import java.util.List; - public class ParserDescription extends NamedStreamPipesEntity { private StaticPropertyGroup config; @@ -34,25 +31,6 @@ public class ParserDescription extends NamedStreamPipesEntity { this.config = new StaticPropertyGroup(); } - public ParserDescription(String uri, String name, String description) { - super(uri, name, description); - this.config = new StaticPropertyGroup(uri, name, description); - } - - public ParserDescription(String uri, - String name, - String description, - List<StaticProperty> config) { - super(uri, name, description); - - this.config = new StaticPropertyGroup(uri, name, description, config); - } - - public ParserDescription(ParserDescription other) { - super(other); - this.config = other.getConfig(); - } - public StaticPropertyGroup getConfig() { return config; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java index 502b650d1b..2fe6256986 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/connect/grounding/ProtocolDescription.java @@ -41,18 +41,6 @@ public class ProtocolDescription extends NamedStreamPipesEntity { this.config = new ArrayList<>(); } - public ProtocolDescription(String uri, String name, String description) { - super(uri, name, description); - this.config = new ArrayList<>(); - this.category = new ArrayList<>(); - } - - public ProtocolDescription(String uri, String name, String description, List<StaticProperty> config) { - super(uri, name, description); - this.config = config; - this.category = new ArrayList<>(); - } - public ProtocolDescription(ProtocolDescription other) { super(other); diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorDescription.java index 0899eea570..9de8809bf8 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorDescription.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorDescription.java @@ -18,10 +18,8 @@ package org.apache.streampipes.model.graph; -import org.apache.streampipes.model.SpDataStream; import org.apache.streampipes.model.base.ConsumableStreamPipesEntity; import org.apache.streampipes.model.output.OutputStrategy; -import org.apache.streampipes.model.staticproperty.StaticProperty; import org.apache.streampipes.model.util.Cloner; import java.util.ArrayList; @@ -33,14 +31,11 @@ public class DataProcessorDescription extends ConsumableStreamPipesEntity { private List<OutputStrategy> outputStrategies; - private String pathName; - private List<String> category; public DataProcessorDescription(DataProcessorDescription other) { super(other); this.outputStrategies = new Cloner().strategies(other.getOutputStrategies()); - this.pathName = other.getPathName(); this.category = new Cloner().epaTypes(other.getCategory()); } @@ -50,31 +45,6 @@ public class DataProcessorDescription extends ConsumableStreamPipesEntity { this.category = new ArrayList<>(); } - public DataProcessorDescription(String uri, String name, String description, String iconUrl, - List<SpDataStream> spDataStreams, List<StaticProperty> staticProperties, - List<OutputStrategy> outputStrategies) { - super(uri, name, description, iconUrl); - this.pathName = uri; - this.spDataStreams = spDataStreams; - this.staticProperties = staticProperties; - this.outputStrategies = outputStrategies; - } - - public DataProcessorDescription(String pathName, String name, String description, String iconUrl) { - super(pathName, name, description, iconUrl); - this.pathName = pathName; - spDataStreams = new ArrayList<>(); - staticProperties = new ArrayList<>(); - } - - public DataProcessorDescription(String pathName, String name, String description) { - super(pathName, name, description, ""); - this.pathName = pathName; - spDataStreams = new ArrayList<>(); - staticProperties = new ArrayList<>(); - } - - public List<String> getCategory() { return category; } @@ -83,14 +53,6 @@ public class DataProcessorDescription extends ConsumableStreamPipesEntity { this.category = category; } - public String getPathName() { - return pathName; - } - - public void setPathName(String pathName) { - this.pathName = pathName; - } - public List<OutputStrategy> getOutputStrategies() { return outputStrategies; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorInvocation.java b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorInvocation.java index bd6876755a..23c651074a 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorInvocation.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataProcessorInvocation.java @@ -22,7 +22,6 @@ import org.apache.streampipes.model.SpDataStream; import org.apache.streampipes.model.base.InvocableStreamPipesEntity; import org.apache.streampipes.model.extensions.svcdiscovery.SpServiceTagPrefix; import org.apache.streampipes.model.output.OutputStrategy; -import org.apache.streampipes.model.staticproperty.StaticProperty; import org.apache.streampipes.model.util.Cloner; import org.apache.streampipes.model.util.ElementIdGenerator; @@ -38,15 +37,12 @@ public class DataProcessorInvocation extends InvocableStreamPipesEntity implemen private List<OutputStrategy> outputStrategies; - private String pathName; - private List<String> category; public DataProcessorInvocation(DataProcessorDescription other) { super(); this.setName(other.getName()); this.setDescription(other.getDescription()); - this.setIconUrl(other.getIconUrl()); this.setInputStreams(other.getSpDataStreams()); this.setSupportedGrounding(other.getSupportedGrounding()); this.setStaticProperties(other.getStaticProperties()); @@ -69,51 +65,16 @@ public class DataProcessorInvocation extends InvocableStreamPipesEntity implemen if (other.getOutputStream() != null) { this.outputStream = new Cloner().stream(other.getOutputStream()); } - this.pathName = other.getPathName(); this.category = new Cloner().epaTypes(other.getCategory()); this.serviceTagPrefix = SpServiceTagPrefix.DATA_PROCESSOR; } - public DataProcessorInvocation(DataProcessorDescription sepa, String domId) { - this(sepa); - this.dom = domId; - this.serviceTagPrefix = SpServiceTagPrefix.DATA_PROCESSOR; - } - public DataProcessorInvocation() { super(); inputStreams = new ArrayList<>(); this.serviceTagPrefix = SpServiceTagPrefix.DATA_PROCESSOR; } - public DataProcessorInvocation(String uri, String name, String description, String iconUrl, String pathName, - List<SpDataStream> spDataStreams, List<StaticProperty> staticProperties) { - super(uri, name, description, iconUrl, SpServiceTagPrefix.DATA_PROCESSOR); - this.pathName = pathName; - this.inputStreams = spDataStreams; - this.staticProperties = staticProperties; - } - - public DataProcessorInvocation(String uri, String name, String description, String iconUrl, String pathName) { - super(uri, name, description, iconUrl, SpServiceTagPrefix.DATA_PROCESSOR); - this.pathName = pathName; - inputStreams = new ArrayList<>(); - staticProperties = new ArrayList<>(); - } - - public boolean addInputStream(SpDataStream spDataStream) { - return inputStreams.add(spDataStream); - } - - - public String getPathName() { - return pathName; - } - - public void setPathName(String pathName) { - this.pathName = pathName; - } - public SpDataStream getOutputStream() { return outputStream; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkDescription.java index 40aa13ddd4..d491d62d20 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkDescription.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkDescription.java @@ -30,22 +30,11 @@ public class DataSinkDescription extends ConsumableStreamPipesEntity { private List<String> category; - public DataSinkDescription(String uri, String name, String description, String iconUrl) { - super(uri, name, description, iconUrl); - this.spDataStreams = new ArrayList<>(); - this.category = new ArrayList<>(); - } - public DataSinkDescription(DataSinkDescription other) { super(other); this.category = new Cloner().ecTypes(other.getCategory()); } - public DataSinkDescription(String uri, String name, String description) { - this(uri, name, description, ""); - this.category = new ArrayList<>(); - } - public DataSinkDescription() { super(); this.category = new ArrayList<>(); @@ -59,5 +48,4 @@ public class DataSinkDescription extends ConsumableStreamPipesEntity { this.category = category; } - } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkInvocation.java b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkInvocation.java index 652180a6ed..a7df9500fd 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkInvocation.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/graph/DataSinkInvocation.java @@ -20,7 +20,6 @@ package org.apache.streampipes.model.graph; import org.apache.streampipes.model.base.InvocableStreamPipesEntity; import org.apache.streampipes.model.extensions.svcdiscovery.SpServiceTagPrefix; -import org.apache.streampipes.model.staticproperty.StaticProperty; import org.apache.streampipes.model.util.ElementIdGenerator; import java.util.ArrayList; @@ -42,7 +41,6 @@ public class DataSinkInvocation extends InvocableStreamPipesEntity { super(); this.setName(other.getName()); this.setDescription(other.getDescription()); - this.setIconUrl(other.getIconUrl()); this.setInputStreams(other.getSpDataStreams()); this.setSupportedGrounding(other.getSupportedGrounding()); this.setStaticProperties(other.getStaticProperties()); @@ -58,26 +56,12 @@ public class DataSinkInvocation extends InvocableStreamPipesEntity { this.serviceTagPrefix = SpServiceTagPrefix.DATA_SINK; } - public DataSinkInvocation(DataSinkDescription sec, String domId) { - this(sec); - this.setDom(domId); - this.serviceTagPrefix = SpServiceTagPrefix.DATA_SINK; - } - public DataSinkInvocation() { super(); inputStreams = new ArrayList<>(); this.serviceTagPrefix = SpServiceTagPrefix.DATA_SINK; } - public List<StaticProperty> getStaticProperties() { - return staticProperties; - } - - public void setStaticProperties(List<StaticProperty> staticProperties) { - this.staticProperties = staticProperties; - } - public List<String> getCategory() { return category; } diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/labeling/Category.java b/streampipes-model/src/main/java/org/apache/streampipes/model/labeling/Category.java deleted file mode 100644 index b5b3b45e40..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/labeling/Category.java +++ /dev/null @@ -1,80 +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.model.labeling; - -import org.apache.streampipes.model.shared.annotation.TsModel; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.gson.annotations.SerializedName; - -@TsModel -public class Category { - private String name; - private String internalName; - private String superLabelId; - - @JsonProperty("_id") - private @SerializedName("_id") String id; - - @JsonProperty("_rev") - private @SerializedName("_rev") String rev; - - public Category() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getInternalName() { - return internalName; - } - - public void setInternalName(String internalName) { - this.internalName = internalName; - } - - public String getSuperLabelId() { - return superLabelId; - } - - public void setSuperLabel(String superLabelId) { - this.superLabelId = superLabelId; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getRev() { - return rev; - } - - public void setRev(String rev) { - this.rev = rev; - } -} diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/labeling/Label.java b/streampipes-model/src/main/java/org/apache/streampipes/model/labeling/Label.java deleted file mode 100644 index 91b4c68faf..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/labeling/Label.java +++ /dev/null @@ -1,89 +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.model.labeling; - -import org.apache.streampipes.model.shared.annotation.TsModel; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.gson.annotations.SerializedName; - -@TsModel -public class Label { - private String name; - private String color; - private String internalName; - private String categoryId; - - @JsonProperty("_id") - private @SerializedName("_id") String id; - - @JsonProperty("_rev") - private @SerializedName("_rev") String rev; - - public Label() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public String getInternalName() { - return internalName; - } - - public void setInternalName(String internalName) { - this.internalName = internalName; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getRev() { - return rev; - } - - public void setRev(String rev) { - this.rev = rev; - } - - public String getCategoryId() { - return categoryId; - } - - public void setCategoryId(String categoryId) { - this.categoryId = categoryId; - } -} diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/monitoring/ElementStatusInfoSettings.java b/streampipes-model/src/main/java/org/apache/streampipes/model/monitoring/ElementStatusInfoSettings.java deleted file mode 100644 index f3731d2a0d..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/monitoring/ElementStatusInfoSettings.java +++ /dev/null @@ -1,94 +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.model.monitoring; - -public class ElementStatusInfoSettings { - - private String elementIdentifier; - - private String kafkaHost; - - private int kafkaPort; - - private String errorTopic; - - private String statsTopic; - - public ElementStatusInfoSettings() { - super(); - } - - public ElementStatusInfoSettings(ElementStatusInfoSettings other) { - this.kafkaHost = other.getKafkaHost(); - this.kafkaPort = other.getKafkaPort(); - this.errorTopic = other.getErrorTopic(); - this.statsTopic = other.getStatsTopic(); - } - - - public ElementStatusInfoSettings(String elementIdentifier, String kafkaHost, int kafkaPort, - String errorTopic, String - statsTopic) { - this.elementIdentifier = elementIdentifier; - this.kafkaHost = kafkaHost; - this.kafkaPort = kafkaPort; - this.errorTopic = errorTopic; - this.statsTopic = statsTopic; - } - - public String getKafkaHost() { - return kafkaHost; - } - - public void setKafkaHost(String kafkaHost) { - this.kafkaHost = kafkaHost; - } - - public int getKafkaPort() { - return kafkaPort; - } - - public void setKafkaPort(int kafkaPort) { - this.kafkaPort = kafkaPort; - } - - public String getErrorTopic() { - return errorTopic; - } - - public void setErrorTopic(String errorTopic) { - this.errorTopic = errorTopic; - } - - public String getStatsTopic() { - return statsTopic; - } - - public void setStatsTopic(String statsTopic) { - this.statsTopic = statsTopic; - } - - public String getElementIdentifier() { - return elementIdentifier; - } - - public void setElementIdentifier(String elementIdentifier) { - this.elementIdentifier = elementIdentifier; - } -} diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/runtime/ContainerProvidedOptionsParameterRequest.java b/streampipes-model/src/main/java/org/apache/streampipes/model/runtime/ContainerProvidedOptionsParameterRequest.java deleted file mode 100644 index ced86d5a32..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/runtime/ContainerProvidedOptionsParameterRequest.java +++ /dev/null @@ -1,84 +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.model.runtime; - -import org.apache.streampipes.model.SpDataStream; -import org.apache.streampipes.model.staticproperty.StaticProperty; - -import java.util.List; - -public class ContainerProvidedOptionsParameterRequest { - - private List<StaticProperty> staticProperties; - private List<SpDataStream> inputStreams; - - private String appId; - private String belongsTo; - private String runtimeResolvableInternalId; - - public ContainerProvidedOptionsParameterRequest(List<StaticProperty> staticProperties, - List<SpDataStream> inputStreams, String belongsTo) { - this.staticProperties = staticProperties; - this.inputStreams = inputStreams; - this.belongsTo = belongsTo; - } - - public ContainerProvidedOptionsParameterRequest() { - - } - - public List<StaticProperty> getStaticProperties() { - return staticProperties; - } - - public void setStaticProperties(List<StaticProperty> staticProperties) { - this.staticProperties = staticProperties; - } - - public List<SpDataStream> getInputStreams() { - return inputStreams; - } - - public void setInputStreams(List<SpDataStream> inputStreams) { - this.inputStreams = inputStreams; - } - - public String getBelongsTo() { - return belongsTo; - } - - public void setBelongsTo(String belongsTo) { - this.belongsTo = belongsTo; - } - - public String getRuntimeResolvableInternalId() { - return runtimeResolvableInternalId; - } - - public void setRuntimeResolvableInternalId(String runtimeResolvableInternalId) { - this.runtimeResolvableInternalId = runtimeResolvableInternalId; - } - - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } -} diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/template/PipelineTemplateDescription.java b/streampipes-model/src/main/java/org/apache/streampipes/model/template/PipelineTemplateDescription.java index 917a840c99..5a00f6c754 100644 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/template/PipelineTemplateDescription.java +++ b/streampipes-model/src/main/java/org/apache/streampipes/model/template/PipelineTemplateDescription.java @@ -35,16 +35,6 @@ public class PipelineTemplateDescription extends NamedStreamPipesEntity { this.boundTo = new ArrayList<>(); } - public PipelineTemplateDescription(String uri, String name, String description) { - super(uri, name, description); - this.boundTo = new ArrayList<>(); - } - - public PipelineTemplateDescription(SpDataStream requiredStream, List<BoundPipelineElement> connectedTo) { - super(); - this.boundTo = connectedTo == null ? new ArrayList<>() : connectedTo; - } - public PipelineTemplateDescription(PipelineTemplateDescription other) { super(other); // TODO use cloner diff --git a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractPipelineElementBuilder.java b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractPipelineElementBuilder.java index 46b6890495..c7984f4ceb 100644 --- a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractPipelineElementBuilder.java +++ b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractPipelineElementBuilder.java @@ -45,15 +45,6 @@ public abstract class AbstractPipelineElementBuilder<X extends AbstractPipelineE this.elementDescription.setAppId(appId); } - @Deprecated - /** - * @deprecated: Use {@link #withAssets(String...)} instead - */ - public X iconUrl(String iconUrl) { - elementDescription.setIconUrl(iconUrl); - return me(); - } - @Deprecated /** * @deprecated: Use {@link #withAssets(String...)} instead diff --git a/streampipes-sdk/src/test/java/org/apache/streampipes/sdk/extractor/AdapterParameterExtractorTest.java b/streampipes-sdk/src/test/java/org/apache/streampipes/sdk/extractor/AdapterParameterExtractorTest.java index 2d054c5422..bc7605f3cf 100644 --- a/streampipes-sdk/src/test/java/org/apache/streampipes/sdk/extractor/AdapterParameterExtractorTest.java +++ b/streampipes-sdk/src/test/java/org/apache/streampipes/sdk/extractor/AdapterParameterExtractorTest.java @@ -38,7 +38,8 @@ public class AdapterParameterExtractorTest { @Test public void selectedParser() throws AdapterException { var parserInstance = mock(IParser.class); - var parserDescription = new ParserDescription("", "parserName", ""); + var parserDescription = new ParserDescription(); + parserDescription.setName("parserName"); when(parserInstance.declareDescription()).thenReturn(parserDescription); when(parserInstance.fromDescription(any())).thenReturn(parserInstance); diff --git a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts index 1cd4d5a729..cae644ba47 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts @@ -20,7 +20,7 @@ /* tslint:disable */ /* eslint-disable */ // @ts-nocheck -// Generated using typescript-generator version 3.2.1263 on 2024-05-21 13:45:10. +// Generated using typescript-generator version 3.2.1263 on 2024-06-17 23:25:59. export class NamedStreamPipesEntity { '@class': @@ -38,7 +38,6 @@ export class NamedStreamPipesEntity { 'description': string; 'dom': string; 'elementId': string; - 'iconUrl': string; 'includedAssets': string[]; 'includedLocales': string[]; 'includesAssets': boolean; @@ -63,7 +62,6 @@ export class NamedStreamPipesEntity { instance.description = data.description; instance.dom = data.dom; instance.elementId = data.elementId; - instance.iconUrl = data.iconUrl; instance.includedAssets = __getCopyArrayFn(__identity<string>())( data.includedAssets, ); @@ -694,29 +692,6 @@ export class CanvasPosition { } } -export class Category { - _id: string; - _rev: string; - internalName: string; - name: string; - superLabel: string; - superLabelId: string; - - static fromData(data: Category, target?: Category): Category { - if (!data) { - return data; - } - const instance = target || new Category(); - instance._id = data._id; - instance._rev = data._rev; - instance.internalName = data.internalName; - instance.name = data.name; - instance.superLabel = data.superLabel; - instance.superLabelId = data.superLabelId; - return instance; - } -} - export class ChangeDatatypeTransformationRuleDescription extends ValueTransformationRuleDescription { '@class': 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription'; 'originalDatatypeXsd': string; @@ -1206,7 +1181,6 @@ export class InvocableStreamPipesEntity 'selectedEndpointUrl': string; 'serviceTagPrefix': SpServiceTagPrefix; 'staticProperties': StaticPropertyUnion[]; - 'statusInfoSettings': ElementStatusInfoSettings; 'streamRequirements': SpDataStream[]; 'supportedGrounding': EventGrounding; 'uncompleted': boolean; @@ -1233,9 +1207,6 @@ export class InvocableStreamPipesEntity instance.staticProperties = __getCopyArrayFn( StaticProperty.fromDataUnion, )(data.staticProperties); - instance.statusInfoSettings = ElementStatusInfoSettings.fromData( - data.statusInfoSettings, - ); instance.streamRequirements = __getCopyArrayFn(SpDataStream.fromData)( data.streamRequirements, ); @@ -1252,7 +1223,6 @@ export class DataProcessorInvocation extends InvocableStreamPipesEntity { 'category': string[]; 'outputStrategies': OutputStrategyUnion[]; 'outputStream': SpDataStream; - 'pathName': string; static 'fromData'( data: DataProcessorInvocation, @@ -1270,7 +1240,6 @@ export class DataProcessorInvocation extends InvocableStreamPipesEntity { OutputStrategy.fromDataUnion, )(data.outputStrategies); instance.outputStream = SpDataStream.fromData(data.outputStream); - instance.pathName = data.pathName; return instance; } } @@ -1439,30 +1408,6 @@ export class ElementComposition { } } -export class ElementStatusInfoSettings { - elementIdentifier: string; - errorTopic: string; - kafkaHost: string; - kafkaPort: number; - statsTopic: string; - - static fromData( - data: ElementStatusInfoSettings, - target?: ElementStatusInfoSettings, - ): ElementStatusInfoSettings { - if (!data) { - return data; - } - const instance = target || new ElementStatusInfoSettings(); - instance.elementIdentifier = data.elementIdentifier; - instance.errorTopic = data.errorTopic; - instance.kafkaHost = data.kafkaHost; - instance.kafkaPort = data.kafkaPort; - instance.statsTopic = data.statsTopic; - return instance; - } -} - export interface EndpointSelectable { correspondingPipeline: string; detachPath: string; @@ -2195,29 +2140,6 @@ export class KeepOutputStrategy extends OutputStrategy { } } -export class Label { - _id: string; - _rev: string; - categoryId: string; - color: string; - internalName: string; - name: string; - - static fromData(data: Label, target?: Label): Label { - if (!data) { - return data; - } - const instance = target || new Label(); - instance._id = data._id; - instance._rev = data._rev; - instance.categoryId = data.categoryId; - instance.color = data.color; - instance.internalName = data.internalName; - instance.name = data.name; - return instance; - } -} - export class ListOutputStrategy extends OutputStrategy { '@class': 'org.apache.streampipes.model.output.ListOutputStrategy'; 'propertyName': string; diff --git a/ui/src/app/connect/components/data-marketplace/adapter-description/adapter-description.component.ts b/ui/src/app/connect/components/data-marketplace/adapter-description/adapter-description.component.ts index 2bcd062365..baf3e9fb6d 100644 --- a/ui/src/app/connect/components/data-marketplace/adapter-description/adapter-description.component.ts +++ b/ui/src/app/connect/components/data-marketplace/adapter-description/adapter-description.component.ts @@ -18,12 +18,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; -import { - AdapterDescription, - AdapterService, -} from '@streampipes/platform-services'; -import { DialogService } from '@streampipes/shared-ui'; -import { MatSnackBar } from '@angular/material/snack-bar'; +import { AdapterDescription } from '@streampipes/platform-services'; import { RestApi } from '../../../../services/rest-api.service'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; @@ -50,10 +45,8 @@ export class AdapterDescriptionComponent implements OnInit { constructor( private restApi: RestApi, - private dataMarketplaceService: AdapterService, private sanitizer: DomSanitizer, public dialog: MatDialog, - private _snackBar: MatSnackBar, ) {} ngOnInit() { @@ -80,18 +73,6 @@ export class AdapterDescriptionComponent implements OnInit { return className; } - getIconUrl() { - // TODO Use "this.adapter.includesAssets" if boolean demoralizing is working - if (this.adapter.includedAssets.length > 0) { - return ( - this.dataMarketplaceService.getAssetUrl(this.adapter.appId) + - '/icon' - ); - } else { - return `assets/img/connect/${this.adapter.iconUrl}`; - } - } - makeAssetIconUrl() { return this.restApi.getAssetUrl(this.adapter.appId) + '/icon'; }
