This is an automated email from the ASF dual-hosted git repository.
bossenti 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 b1daad120 remove deprecated methods of parameter extractor (#2156)
b1daad120 is described below
commit b1daad120e63cb3f3bbbea3806f734c005865c66
Author: Tim <[email protected]>
AuthorDate: Thu Nov 9 07:12:42 2023 +0100
remove deprecated methods of parameter extractor (#2156)
---
.../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 7b3e7539b..447aad86f 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
@@ -25,8 +25,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 {
@@ -48,23 +46,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> 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 a86a1ad58..ad29407fe 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);