diff --git a/.classpath b/.classpath
index e87016c..eb4a3d2 100644
--- a/.classpath
+++ b/.classpath
@@ -1,12 +1,12 @@
-
+
-
+
@@ -33,5 +33,5 @@
-
+
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 7749855..816faa6 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,4 +1,8 @@
+
+ Updated to support get operator by id with refresh
+
Updated to support StorageHub[ticket #11720]
diff --git a/pom.xml b/pom.xml
index b3f44ba..0265010 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
org.gcube.data.analysis
data-miner-manager-cl
- 1.5.0-SNAPSHOT
+ 1.6.0-SNAPSHOT
data-miner-manager-cl
DataMiner Manager Client Library
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient.java
index c4ea41c..a446e77 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient.java
@@ -59,6 +59,18 @@ public abstract class SClient implements Serializable {
*/
public abstract Operator getOperatorById(String id) throws Exception;
+ /**
+ *
+ * @param id
+ * operator id
+ * @param refresh
+ * if true refresh the operators in cache
+ * @return operator
+ * @throws Exception
+ * exception
+ */
+ public abstract Operator getOperatorById(String id, boolean refresh) throws Exception;
+
/**
* Get input paramters of the operator
*
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient4WPS.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient4WPS.java
index 5cb91c0..cd63d43 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient4WPS.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/dmservice/SClient4WPS.java
@@ -224,15 +224,21 @@ public class SClient4WPS extends SClient {
}
}
+
@Override
public Operator getOperatorById(String id) throws Exception {
+ return getOperatorById(id, false);
+ }
+
+ @Override
+ public Operator getOperatorById(String id, boolean refresh) throws Exception {
if (id == null || id.isEmpty()) {
String error = "Invalid operator request, id=" + id;
logger.error(error);
throw new ServiceException(error);
}
- List operatorsClassifications = getOperatorsClassifications();
+ List operatorsClassifications = getOperatorsClassifications(refresh);
if (operatorsClassifications != null && operatorsClassifications.size() > 0) {
Operator operator = null;