This is an automated email from the ASF dual-hosted git repository. bossenti pushed a commit to branch remove-deprecations-parameter-extractor in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 09bb3de7099f20fae8ce5e1dc78b537f4b66c2f2 Author: bossenti <[email protected]> AuthorDate: Fri Oct 27 22:21:13 2023 +0200 remove deprecated methods --- .../api/extractor/IParameterExtractor.java | 17 ------- .../sdk/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 9c091b7d2..225d5b1ba 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.schema.PropertyScope; 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<T extends InvocableStreamPipesEntity> { @@ -49,23 +47,8 @@ public interface IParameterExtractor<T extends InvocableStreamPipesEntity> { 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> V selectedSingleValueFromRemote(String internalName, Class<V> targetClass); - <V> V selectedSingleValue(String internalName, Class<V> targetClass); <V> V selectedSingleValueInternalName(String internalName, Class<V> 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 3ec7ee629..fe40747f7 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 org.apache.streampipes.sdk.utils.Datatypes; 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 abstract class AbstractParameterExtractor<T extends InvocableStreamPipesE 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, T extends SelectionStaticProperty> V selectedSingleValue(String internalName, Class<V> targetClass, Class<T> oneOfStaticProperty) { return typeParser.parse(getStaticPropertyByName(internalName, oneOfStaticProperty) @@ -210,16 +164,6 @@ public abstract class AbstractParameterExtractor<T extends InvocableStreamPipesE .getName(), targetClass); } - - /** - * @deprecated Use {@link #selectedSingleValue(String, Class)} instead - */ - @Override - @Deprecated - public <V> V selectedSingleValueFromRemote(String internalName, Class<V> targetClass) { - return selectedSingleValue(internalName, targetClass); - } - @Override public <V> V selectedSingleValue(String internalName, Class<V> targetClass) { return selectedSingleValue(internalName, targetClass, OneOfStaticProperty.class);
