This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 6a18314037 refactor(#3169): Remove deprecated code related to
supported formats (#3458)
6a18314037 is described below
commit 6a1831403747222e1ffafd3a768de2bcf45eff60
Author: Philipp Zehnder <[email protected]>
AuthorDate: Thu Feb 6 07:48:05 2025 +0100
refactor(#3169): Remove deprecated code related to supported formats (#3458)
---
.../streampipes/client/api/IStreamPipesClient.java | 4 --
.../streampipes/client/StreamPipesClient.java | 12 ----
.../model/SpServiceDefinitionBuilder.java | 18 -----
.../builder/AbstractProcessingElementBuilder.java | 31 ---------
.../streampipes/sdk/helpers/SupportedFormats.java | 78 ----------------------
5 files changed, 143 deletions(-)
diff --git
a/streampipes-client-api/src/main/java/org/apache/streampipes/client/api/IStreamPipesClient.java
b/streampipes-client-api/src/main/java/org/apache/streampipes/client/api/IStreamPipesClient.java
index 8e91c1ce45..70d5200ed2 100644
---
a/streampipes-client-api/src/main/java/org/apache/streampipes/client/api/IStreamPipesClient.java
+++
b/streampipes-client-api/src/main/java/org/apache/streampipes/client/api/IStreamPipesClient.java
@@ -21,7 +21,6 @@ package org.apache.streampipes.client.api;
import org.apache.streampipes.client.api.config.ClientConnectionUrlResolver;
import org.apache.streampipes.client.api.config.IStreamPipesClientConfig;
import org.apache.streampipes.client.api.credentials.CredentialsProvider;
-import org.apache.streampipes.dataformat.SpDataFormatFactory;
import org.apache.streampipes.messaging.SpProtocolDefinitionFactory;
import org.apache.streampipes.model.mail.SpEmail;
@@ -29,9 +28,6 @@ import java.io.Serializable;
public interface IStreamPipesClient extends Serializable {
- @Deprecated(since = "0.97.0", forRemoval = true)
- void registerDataFormat(SpDataFormatFactory spDataFormatFactory);
-
void registerProtocol(SpProtocolDefinitionFactory<?>
spProtocolDefinitionFactory);
CredentialsProvider getCredentials();
diff --git
a/streampipes-client/src/main/java/org/apache/streampipes/client/StreamPipesClient.java
b/streampipes-client/src/main/java/org/apache/streampipes/client/StreamPipesClient.java
index a8dfa12b14..0c7e41ca99 100644
---
a/streampipes-client/src/main/java/org/apache/streampipes/client/StreamPipesClient.java
+++
b/streampipes-client/src/main/java/org/apache/streampipes/client/StreamPipesClient.java
@@ -36,7 +36,6 @@ import
org.apache.streampipes.client.api.credentials.CredentialsProvider;
import org.apache.streampipes.client.model.StreamPipesClientConfig;
import org.apache.streampipes.client.model.StreamPipesClientConnectionConfig;
import org.apache.streampipes.client.paths.ApiPath;
-import org.apache.streampipes.dataformat.SpDataFormatFactory;
import org.apache.streampipes.messaging.SpProtocolDefinitionFactory;
import org.apache.streampipes.model.mail.SpEmail;
@@ -119,17 +118,6 @@ public class StreamPipesClient implements
return new StreamPipesClient(streamPipesHost, streamPipesPort,
credentials, httpsDisabled);
}
- /**
- * Register a new data format that is used by the live API
- *
- * @deprecated
- * @param spDataFormatFactory The data format factory
- */
- @Deprecated(forRemoval = true, since = "0.97.0")
- @Override
- public void registerDataFormat(SpDataFormatFactory spDataFormatFactory) {
- }
-
@Override
public void registerProtocol(SpProtocolDefinitionFactory<?>
spProtocolDefinitionFactory) {
this.config.addTransportProtocol(spProtocolDefinitionFactory);
diff --git
a/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java
b/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java
index ac02d4533b..9061fc3e53 100644
---
a/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java
+++
b/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/model/SpServiceDefinitionBuilder.java
@@ -17,7 +17,6 @@
*/
package org.apache.streampipes.extensions.management.model;
-import org.apache.streampipes.dataformat.SpDataFormatFactory;
import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter;
import org.apache.streampipes.extensions.api.declarer.IExtensionModuleExport;
import
org.apache.streampipes.extensions.api.declarer.IStreamPipesFunctionDeclarer;
@@ -116,23 +115,6 @@ public class SpServiceDefinitionBuilder {
return this;
}
-
- /**
- * @deprecated data format registration is no longer required
- */
- @Deprecated(since = "0.97.0", forRemoval = true)
- public SpServiceDefinitionBuilder
registerMessagingFormat(SpDataFormatFactory dataFormatDefinition) {
- return this;
- }
-
- /**
- * @deprecated data format registration is no longer required
- */
- @Deprecated(since = "0.97.0", forRemoval = true)
- public SpServiceDefinitionBuilder
registerMessagingFormats(SpDataFormatFactory... dataFormatDefinitions) {
- return this;
- }
-
public SpServiceDefinitionBuilder
registerMessagingProtocol(SpProtocolDefinitionFactory<?> protocol) {
this.serviceDefinition.addProtocolDefinitionFactory(protocol);
return this;
diff --git
a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractProcessingElementBuilder.java
b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractProcessingElementBuilder.java
index b6d3a94492..13d8870eba 100644
---
a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractProcessingElementBuilder.java
+++
b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractProcessingElementBuilder.java
@@ -22,7 +22,6 @@ import org.apache.streampipes.model.SpDataStream;
import org.apache.streampipes.model.base.ConsumableStreamPipesEntity;
import org.apache.streampipes.model.constants.PropertySelectorConstants;
import org.apache.streampipes.model.grounding.EventGrounding;
-import org.apache.streampipes.model.grounding.TransportFormat;
import org.apache.streampipes.model.grounding.TransportProtocol;
import org.apache.streampipes.model.schema.EventProperty;
import org.apache.streampipes.model.schema.EventSchema;
@@ -141,36 +140,6 @@ public abstract class AbstractProcessingElementBuilder<K
extends
return me();
}
- /**
- * Assigns supported transport formats to the pipeline elements that can be
handled at runtime (e.g.,
- * JSON or XMl).
- *
- * @deprecated format assignment is no longer necessary
- * @param format An arbitrary number of supported {@link
org.apache.streampipes.model.grounding.TransportFormat}s. Use
- * {@link org.apache.streampipes.sdk.helpers.SupportedFormats}
to assign formats from some pre-defined
- * ones or create your own by following the developer guide.
- * @return this
- */
- @Deprecated(forRemoval = true, since = "0.97.0")
- public K supportedFormats(TransportFormat... format) {
- return supportedFormats(Arrays.asList(format));
- }
-
- /**
- * Assigns supported transport formats to the pipeline elements that can be
handled at runtime (e.g.,
- * JSON or XMl).
- *
- * @deprecated format assignment is no longer necessary
- * @param formats A list of supported {@link
org.apache.streampipes.model.grounding.TransportFormat}s. Use
- * {@link
org.apache.streampipes.sdk.helpers.SupportedFormats} to assign formats from
some pre-defined
- * ones or create your own by following the developer guide.
- * @return this
- */
- @Deprecated(forRemoval = true, since = "0.97.0")
- public K supportedFormats(List<TransportFormat> formats) {
- return me();
- }
-
/**
* Assigns supported communication/transport protocols to the pipeline
elements that can be handled at runtime (e.g.,
* Kafka or JMS).
diff --git
a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/SupportedFormats.java
b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/SupportedFormats.java
deleted file mode 100644
index e70839e182..0000000000
---
a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/SupportedFormats.java
+++ /dev/null
@@ -1,78 +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.sdk.helpers;
-
-import org.apache.streampipes.model.grounding.TransportFormat;
-import org.apache.streampipes.vocabulary.MessageFormat;
-
-/**
- * @deprecated formats are no longer necessary
- */
-@Deprecated(forRemoval = true, since = "0.97.0")
-public class SupportedFormats {
-
- /**
- * Defines that a pipeline element (data processor or data sink) supports
processing messaging arriving in JSON format
- *
- * @return The resulting {@link
org.apache.streampipes.model.grounding.TransportFormat}.
- */
- public static TransportFormat jsonFormat() {
- return new TransportFormat(MessageFormat.JSON);
- }
-
- /**
- * Defines that a pipeline element (data processor or data sink) supports
processing messaging arriving in Thrift
- * format
- *
- * @return The resulting {@link
org.apache.streampipes.model.grounding.TransportFormat}.
- */
- public static TransportFormat thriftFormat() {
- return new TransportFormat(MessageFormat.THRIFT);
- }
-
- /**
- * Defines that a pipeline element (data processor or data sink) supports
processing messaging
- * arriving in Cbor format
- *
- * @return The resulting {@link
org.apache.streampipes.model.grounding.TransportFormat}.
- */
- public static TransportFormat cborFormat() {
- return new TransportFormat(MessageFormat.CBOR);
- }
-
- /**
- * Defines that a pipeline element (data processor or data sink) supports
processing messaging
- * arriving in fast-serialization format
- *
- * @return The resulting {@link
org.apache.streampipes.model.grounding.TransportFormat}.
- */
- public static TransportFormat fstFormat() {
- return new TransportFormat(MessageFormat.FST);
- }
-
- /**
- * Defines that a pipeline element (data processor or data sink) supports
processing messaging
- * arriving in smile format
- *
- * @return The resulting {@link
org.apache.streampipes.model.grounding.TransportFormat}.
- */
- public static TransportFormat smileFormat() {
- return new TransportFormat(MessageFormat.SMILE);
- }
-}