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:
parent
938bfb2cdd
commit
c22a27a19e
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<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>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</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>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -33,5 +33,5 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</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>
|
</classpath>
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<ReleaseNotes>
|
<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"
|
<Changeset component="${groupId}.${artifactId}.1-5-0"
|
||||||
date="2018-10-01">
|
date="2018-10-01">
|
||||||
<Change>Updated to support StorageHub[ticket #11720]</Change>
|
<Change>Updated to support StorageHub[ticket #11720]</Change>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.data.analysis</groupId>
|
<groupId>org.gcube.data.analysis</groupId>
|
||||||
<artifactId>data-miner-manager-cl</artifactId>
|
<artifactId>data-miner-manager-cl</artifactId>
|
||||||
<version>1.5.0-SNAPSHOT</version>
|
<version>1.6.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>data-miner-manager-cl</name>
|
<name>data-miner-manager-cl</name>
|
||||||
<description>DataMiner Manager Client Library</description>
|
<description>DataMiner Manager Client Library</description>
|
||||||
|
|
|
@ -59,6 +59,18 @@ public abstract class SClient implements Serializable {
|
||||||
*/
|
*/
|
||||||
public abstract Operator getOperatorById(String id) throws Exception;
|
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
|
* Get input paramters of the operator
|
||||||
*
|
*
|
||||||
|
|
|
@ -224,15 +224,21 @@ public class SClient4WPS extends SClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Operator getOperatorById(String id) throws Exception {
|
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()) {
|
if (id == null || id.isEmpty()) {
|
||||||
String error = "Invalid operator request, id=" + id;
|
String error = "Invalid operator request, id=" + id;
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
throw new ServiceException(error);
|
throw new ServiceException(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<OperatorsClassification> operatorsClassifications = getOperatorsClassifications();
|
List<OperatorsClassification> operatorsClassifications = getOperatorsClassifications(refresh);
|
||||||
|
|
||||||
if (operatorsClassifications != null && operatorsClassifications.size() > 0) {
|
if (operatorsClassifications != null && operatorsClassifications.size() > 0) {
|
||||||
Operator operator = null;
|
Operator operator = null;
|
||||||
|
|
Loading…
Reference in New Issue