From 09bb3de7099f20fae8ce5e1dc78b537f4b66c2f2 Mon Sep 17 00:00:00 2001 From: bossenti Date: Fri, 27 Oct 2023 22:21:13 +0200 Subject: [PATCH] remove deprecated methods --- .../api/extractor/IParameterExtractor.java | 17 ------ .../extractor/AbstractParameterExtractor.java | 56 ------------------- 2 files changed, 73 deletions(-) diff --git a/streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/extractor/IParameterExtractor.java b/streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/extractor/IParameterExtractor.java index 9c091b7d2e..225d5b1ba7 100644 --- a/streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/extractor/IParameterExtractor.java +++ b/streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/extractor/IParameterExtractor.java @@ -26,8 +26,6 @@ import org.apache.streampipes.model.staticproperty.StaticProperty; import org.apache.streampipes.model.staticproperty.StaticPropertyGroup; -import java.io.IOException; -import java.io.InputStream; import java.util.List; public interface IParameterExtractor { @@ -49,23 +47,8 @@ public interface IParameterExtractor { String selectedColor(String internalName); - @Deprecated(since = "0.90.0", forRemoval = true) - String fileContentsAsString(String internalName) throws IOException; - - @Deprecated(since = "0.90.0", forRemoval = true) - byte[] fileContentsAsByteArray(String internalName) throws IOException; - - @Deprecated(since = "0.90.0", forRemoval = true) - InputStream fileContentsAsStream(String internalName) throws IOException; - String selectedFilename(String internalName); - @Deprecated(since = "0.90.0", forRemoval = true) - String selectedFileFetchUrl(String internalName); - - @Deprecated - V selectedSingleValueFromRemote(String internalName, Class targetClass); - V selectedSingleValue(String internalName, Class targetClass); V selectedSingleValueInternalName(String internalName, Class targetClass); diff --git a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/extractor/AbstractParameterExtractor.java b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/extractor/AbstractParameterExtractor.java index 3ec7ee6299..fe40747f76 100644 --- a/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/extractor/AbstractParameterExtractor.java +++ b/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/extractor/AbstractParameterExtractor.java @@ -54,8 +54,6 @@ import com.github.drapostolos.typeparser.TypeParser; -import java.io.IOException; -import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -150,55 +148,11 @@ public String selectedColor(String internalName) { return getStaticPropertyByName(internalName, ColorPickerStaticProperty.class).getSelectedColor(); } - /** - * @deprecated This won't work after release 0.69.0 as all API requests against the core need to be authenticated. - * Use the StreamPipes Client File API instead (e.g., StreamPipesClientResolver.makeStreamPipesClientInstance()). - **/ - @Override - @Deprecated(since = "0.90.0", forRemoval = true) - public String fileContentsAsString(String internalName) throws IOException { - throw new IllegalArgumentException( - "Deprecated as API requests need to be authenticated - use the StreamPipes Client file API instead."); - } - - /** - * @deprecated This won't work after release 0.69.0 as all API requests against the core need to be authenticated. - * Use the StreamPipes Client File API instead (e.g., StreamPipesClientResolver.makeStreamPipesClientInstance()). - **/ - @Override - @Deprecated(since = "0.90.0", forRemoval = true) - public byte[] fileContentsAsByteArray(String internalName) throws IOException { - throw new IllegalArgumentException( - "Deprecated as API requests need to be authenticated - use the StreamPipes Client file API instead."); - } - - /** - * @deprecated This won't work after release 0.69.0 as all API requests against the core need to be authenticated. - * Use the StreamPipes Client File API instead (e.g., StreamPipesClientResolver.makeStreamPipesClientInstance()). - **/ - @Override - @Deprecated(since = "0.90.0", forRemoval = true) - public InputStream fileContentsAsStream(String internalName) throws IOException { - throw new IllegalArgumentException( - "Deprecated as API requests need to be authenticated - use the StreamPipes Client file API instead."); - } - @Override public String selectedFilename(String internalName) { return getStaticPropertyByName(internalName, FileStaticProperty.class).getLocationPath(); } - /** - * @deprecated This won't work after release 0.69.0 as all API requests against the core need to be authenticated. - * Use the StreamPipes Client File API instead (e.g., StreamPipesClientResolver.makeStreamPipesClientInstance()). - **/ - @Override - @Deprecated(since = "0.90.0", forRemoval = true) - public String selectedFileFetchUrl(String internalName) { - throw new IllegalArgumentException( - "Deprecated as API requests need to be authenticated - use the StreamPipes Client file API instead."); - } - private V selectedSingleValue(String internalName, Class targetClass, Class oneOfStaticProperty) { return typeParser.parse(getStaticPropertyByName(internalName, oneOfStaticProperty) @@ -210,16 +164,6 @@ private V selectedSingleValue(String inte .getName(), targetClass); } - - /** - * @deprecated Use {@link #selectedSingleValue(String, Class)} instead - */ - @Override - @Deprecated - public V selectedSingleValueFromRemote(String internalName, Class targetClass) { - return selectedSingleValue(internalName, targetClass); - } - @Override public V selectedSingleValue(String internalName, Class targetClass) { return selectedSingleValue(internalName, targetClass, OneOfStaticProperty.class);