Added getOperatorById with refresh option

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/data-miner-manager-cl@176540 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2019-01-14 19:03:53 +00:00
parent 938bfb2cdd
commit c22a27a19e
5 changed files with 27 additions and 5 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/data-miner-manager-cl-1.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/data-miner-manager-cl-1.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-cl-1.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-cl-1.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -33,5 +33,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/data-miner-manager-cl-1.5.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/data-miner-manager-cl-1.6.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,4 +1,8 @@
<ReleaseNotes>
<Changeset component="${groupId}.${artifactId}.1-6-0"
date="2019-01-31">
<Change>Updated to support get operator by id with refresh</Change>
</Changeset>
<Changeset component="${groupId}.${artifactId}.1-5-0"
date="2018-10-01">
<Change>Updated to support StorageHub[ticket #11720]</Change>

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.data.analysis</groupId>
<artifactId>data-miner-manager-cl</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<name>data-miner-manager-cl</name>
<description>DataMiner Manager Client Library</description>

View File

@ -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
*

View File

@ -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<OperatorsClassification> operatorsClassifications = getOperatorsClassifications();
List<OperatorsClassification> operatorsClassifications = getOperatorsClassifications(refresh);
if (operatorsClassifications != null && operatorsClassifications.size() > 0) {
Operator operator = null;