removed ScopeProvider.set everywhere
fixed occurrencescall git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/speciesdiscovery@141544 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f82797b6f1
commit
2b71b38a8b
|
@ -1,20 +1,21 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="lib" path="/home/francesco-mangiacrapa/libraries/asm-5.0.3/lib/asm-5.0.3.jar"/>
|
<classpathentry kind="lib" path="/home/francesco-mangiacrapa/libraries/asm-5.0.3/lib/asm-5.0.3.jar"/>
|
||||||
<classpathentry kind="src" output="target/species-discovery-3.8.2-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/species-discovery-3.9.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 including="**/*.java" kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/resources"/>
|
<classpathentry including="**/*.java" kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/resources"/>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry excluding="log4j/" kind="src" output="target/test-classes" path="src/test/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 including="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
|
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||||
|
<classpathentry including="*.properties" kind="src" path="src/test/java/log4j"/>
|
||||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
|
@ -31,5 +32,5 @@
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/species-discovery-3.8.2-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/species-discovery-3.9.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java/log4j"/>
|
||||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||||
<property name="context-root" value="species-discovery"/>
|
<property name="context-root" value="species-discovery"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
|
@ -41,19 +41,8 @@ import org.gcube.portlets.user.speciesdiscovery.shared.TaxonomyRow;
|
||||||
*/
|
*/
|
||||||
public class TaxonomyRowTable extends HttpServlet {
|
public class TaxonomyRowTable extends HttpServlet {
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
protected static final String UTF_8 = "UTF-8";
|
protected static final String UTF_8 = "UTF-8";
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 9157876104914505028L;
|
private static final long serialVersionUID = 9157876104914505028L;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public static final String TEXT_HTML = "text/html; charset=UTF-8";
|
public static final String TEXT_HTML = "text/html; charset=UTF-8";
|
||||||
|
|
||||||
public static final String DOCTYPE = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
|
public static final String DOCTYPE = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
|
||||||
|
|
|
@ -68,8 +68,7 @@ public class SessionUtil {
|
||||||
SpeciesService service = (SpeciesService) session.getAttribute(SPECIES_SERVICE);
|
SpeciesService service = (SpeciesService) session.getAttribute(SPECIES_SERVICE);
|
||||||
if (service==null) {
|
if (service==null) {
|
||||||
logger.trace("Service not found, creating it");
|
logger.trace("Service not found, creating it");
|
||||||
String scope = session.getScope();
|
service = new SpeciesService();
|
||||||
service = new SpeciesService(scope, session);
|
|
||||||
session.setAttribute(SPECIES_SERVICE, service);
|
session.setAttribute(SPECIES_SERVICE, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,6 @@ public class DaoSession {
|
||||||
|
|
||||||
Map<String,String> properties = new HashMap<String, String>();
|
Map<String,String> properties = new HashMap<String, String>();
|
||||||
// properties.put("javax.persistence.jdbc.driver", jdbcDriverH2);
|
// properties.put("javax.persistence.jdbc.driver", jdbcDriverH2);
|
||||||
|
|
||||||
try{
|
try{
|
||||||
properties.put("javax.persistence.jdbc.url", getConnectionUrl(session));
|
properties.put("javax.persistence.jdbc.url", getConnectionUrl(session));
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,6 @@ import java.util.Map.Entry;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.gcube.application.framework.core.session.ASLSession;
|
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
|
||||||
import org.gcube.data.spd.client.proxies.ClassificationClient;
|
import org.gcube.data.spd.client.proxies.ClassificationClient;
|
||||||
import org.gcube.data.spd.client.proxies.ExecutorClient;
|
import org.gcube.data.spd.client.proxies.ExecutorClient;
|
||||||
import org.gcube.data.spd.client.proxies.ManagerClient;
|
import org.gcube.data.spd.client.proxies.ManagerClient;
|
||||||
|
@ -59,59 +57,24 @@ public class SpeciesService {
|
||||||
|
|
||||||
protected Logger logger = Logger.getLogger(SpeciesService.class);
|
protected Logger logger = Logger.getLogger(SpeciesService.class);
|
||||||
protected String scope;
|
protected String scope;
|
||||||
protected ASLSession session;
|
|
||||||
protected ManagerClient call;
|
protected ManagerClient call;
|
||||||
protected OccurrenceClient occurrencesCall;
|
protected OccurrenceClient occurrencesCall;
|
||||||
protected ClassificationClient classificationCall;
|
protected ClassificationClient classificationCall;
|
||||||
protected ExecutorClient executorCall;
|
protected ExecutorClient executorCall;
|
||||||
protected String lastQuery = "";
|
protected String lastQuery = "";
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a new species service.
|
|
||||||
*
|
|
||||||
* @param scope
|
|
||||||
* the scope
|
|
||||||
* @param session
|
|
||||||
* the session
|
|
||||||
* @throws Exception
|
|
||||||
* the exception
|
|
||||||
*/
|
|
||||||
public SpeciesService(String scope, ASLSession session)
|
|
||||||
throws Exception {
|
|
||||||
|
|
||||||
this(scope);
|
|
||||||
this.session = session;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new species service.
|
* Instantiates a new species service.
|
||||||
*
|
*
|
||||||
* @param scope
|
* @throws Exception the exception
|
||||||
* the scope
|
|
||||||
* @throws Exception
|
|
||||||
* the exception
|
|
||||||
*/
|
*/
|
||||||
public SpeciesService(String scope)
|
public SpeciesService() throws Exception {
|
||||||
throws Exception {
|
|
||||||
|
|
||||||
this.scope = scope;
|
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
// this.call = manager().at(
|
|
||||||
// URI.create("http://node24.d.d4science.research-infrastructures.eu:9000")).withTimeout(3,
|
|
||||||
// TimeUnit.MINUTES).build();
|
|
||||||
// this.occurrencesCall = occurrences().at(
|
|
||||||
// URI.create("http://node24.d.d4science.research-infrastructures.eu:9000")).withTimeout(3,
|
|
||||||
// TimeUnit.MINUTES).build();
|
|
||||||
// this.classificationCall = classification().at(
|
|
||||||
// URI.create("http://node24.d.d4science.research-infrastructures.eu:9000")).withTimeout(3,
|
|
||||||
// TimeUnit.MINUTES).build();
|
|
||||||
System.out.println("CALLING MANAGER ");
|
System.out.println("CALLING MANAGER ");
|
||||||
this.call = manager().withTimeout(3, TimeUnit.MINUTES).build();
|
this.call = manager().withTimeout(3, TimeUnit.MINUTES).build();
|
||||||
this.executorCall = executor().withTimeout(3, TimeUnit.MINUTES).build();
|
this.executorCall = executor().withTimeout(3, TimeUnit.MINUTES).build();
|
||||||
OccurrenceClient a =
|
this.occurrencesCall = occurrences().withTimeout(3, TimeUnit.MINUTES).build();
|
||||||
occurrences().withTimeout(3, TimeUnit.MINUTES).build();
|
this.classificationCall = classification().withTimeout(3, TimeUnit.MINUTES).build();
|
||||||
this.classificationCall =
|
|
||||||
classification().withTimeout(3, TimeUnit.MINUTES).build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -129,7 +92,6 @@ public class SpeciesService {
|
||||||
|
|
||||||
this.scope = scope;
|
this.scope = scope;
|
||||||
if (instanceOnlyOccurrence) {
|
if (instanceOnlyOccurrence) {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
System.out.println("CALLING OCCURRENCE MANAGER ");
|
System.out.println("CALLING OCCURRENCE MANAGER ");
|
||||||
this.occurrencesCall = occurrences().withTimeout(3, TimeUnit.MINUTES).build();
|
this.occurrencesCall = occurrences().withTimeout(3, TimeUnit.MINUTES).build();
|
||||||
}
|
}
|
||||||
|
@ -185,7 +147,6 @@ public class SpeciesService {
|
||||||
|
|
||||||
logger.trace("retrieveTaxonomyById...");
|
logger.trace("retrieveTaxonomyById...");
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
Stream<TaxonomyItem> stream = classificationCall.getTaxaByIds(ids);
|
Stream<TaxonomyItem> stream = classificationCall.getTaxaByIds(ids);
|
||||||
return new StreamIterator<TaxonomyItem>(stream);
|
return new StreamIterator<TaxonomyItem>(stream);
|
||||||
}
|
}
|
||||||
|
@ -211,7 +172,6 @@ public class SpeciesService {
|
||||||
|
|
||||||
logger.trace("retrieveSynonymsById...");
|
logger.trace("retrieveSynonymsById...");
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
Stream<TaxonomyItem> stream =
|
Stream<TaxonomyItem> stream =
|
||||||
classificationCall.getSynonymsById(id);
|
classificationCall.getSynonymsById(id);
|
||||||
return new StreamIterator<TaxonomyItem>(stream);
|
return new StreamIterator<TaxonomyItem>(stream);
|
||||||
|
@ -239,9 +199,7 @@ public class SpeciesService {
|
||||||
logger.trace("search by Query - query is: " + query);
|
logger.trace("search by Query - query is: " + query);
|
||||||
// System.out.println("searchByQuery query: "+query);
|
// System.out.println("searchByQuery query: "+query);
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
lastQuery = query;
|
lastQuery = query;
|
||||||
// System.err.println("ScopeProvider SCOPE "+ScopeProvider.instance.get());
|
|
||||||
logger.trace("call species service search...");
|
logger.trace("call species service search...");
|
||||||
// System.out.println("call species service search...");
|
// System.out.println("call species service search...");
|
||||||
Stream<ResultElement> stream = call.search(query);
|
Stream<ResultElement> stream = call.search(query);
|
||||||
|
@ -286,10 +244,7 @@ public class SpeciesService {
|
||||||
throws SearchServiceException {
|
throws SearchServiceException {
|
||||||
|
|
||||||
logger.trace("searchByQuery query: " + query);
|
logger.trace("searchByQuery query: " + query);
|
||||||
// System.out.println("searchByQuery query: "+query);
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
// System.err.println("ScopeProvider SCOPE "+ScopeProvider.instance.get());
|
|
||||||
logger.trace("call species service search...");
|
logger.trace("call species service search...");
|
||||||
System.out.println("call species service search...");
|
System.out.println("call species service search...");
|
||||||
return call.search(query);
|
return call.search(query);
|
||||||
|
@ -316,7 +271,6 @@ public class SpeciesService {
|
||||||
try {
|
try {
|
||||||
List<DataSourceModel> listDsModel =
|
List<DataSourceModel> listDsModel =
|
||||||
new ArrayList<DataSourceModel>();
|
new ArrayList<DataSourceModel>();
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
System.out.println("setting scope " + scope);
|
System.out.println("setting scope " + scope);
|
||||||
List<PluginDescription> plugin = call.getPluginsDescription();
|
List<PluginDescription> plugin = call.getPluginsDescription();
|
||||||
if (plugin != null) {
|
if (plugin != null) {
|
||||||
|
@ -475,9 +429,6 @@ public class SpeciesService {
|
||||||
throws SearchServiceException {
|
throws SearchServiceException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Stream<String> keysStream = convert(keys);
|
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
logger.trace("Instancing scope: "+scope);
|
|
||||||
logger.trace("Calling occurrencesCall passing keys: "+keys);
|
logger.trace("Calling occurrencesCall passing keys: "+keys);
|
||||||
logger.trace("occurrencesCall != null? "+(occurrencesCall==null));
|
logger.trace("occurrencesCall != null? "+(occurrencesCall==null));
|
||||||
Stream<OccurrencePoint> stream = occurrencesCall.getByKeys(keys);
|
Stream<OccurrencePoint> stream = occurrencesCall.getByKeys(keys);
|
||||||
|
@ -504,7 +455,6 @@ public class SpeciesService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Stream<String> idsStream = convert(ids);
|
// Stream<String> idsStream = convert(ids);
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
Stream<OccurrencePoint> stream = occurrencesCall.getByIds(ids);
|
Stream<OccurrencePoint> stream = occurrencesCall.getByIds(ids);
|
||||||
return new StreamIterator<OccurrencePoint>(stream);
|
return new StreamIterator<OccurrencePoint>(stream);
|
||||||
}
|
}
|
||||||
|
@ -530,7 +480,6 @@ public class SpeciesService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Stream<String> keysStream = convert(keys);
|
// Stream<String> keysStream = convert(keys);
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
return occurrencesCall.createLayer(streamKey);
|
return occurrencesCall.createLayer(streamKey);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
@ -555,7 +504,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
Stream<TaxonomyItem> items =
|
Stream<TaxonomyItem> items =
|
||||||
classificationCall.getTaxonChildrenById(parentId);
|
classificationCall.getTaxonChildrenById(parentId);
|
||||||
return new StreamIterator<TaxonomyItem>(items);
|
return new StreamIterator<TaxonomyItem>(items);
|
||||||
|
@ -578,7 +526,6 @@ public class SpeciesService {
|
||||||
*/
|
*/
|
||||||
public CompleteJobStatus getTaxonomyJobById(String jobId) {
|
public CompleteJobStatus getTaxonomyJobById(String jobId) {
|
||||||
|
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
CompleteJobStatus status = null;
|
CompleteJobStatus status = null;
|
||||||
try {
|
try {
|
||||||
status = this.executorCall.getStatus(jobId);
|
status = this.executorCall.getStatus(jobId);
|
||||||
|
@ -609,7 +556,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
String url = this.executorCall.getResultLink(jobIdentifier);
|
String url = this.executorCall.getResultLink(jobIdentifier);
|
||||||
if (url == null || url.isEmpty()) {
|
if (url == null || url.isEmpty()) {
|
||||||
|
@ -640,7 +586,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
String url = this.executorCall.getErrorLink(jobIdentifier);
|
String url = this.executorCall.getErrorLink(jobIdentifier);
|
||||||
if (url == null || url.isEmpty()) {
|
if (url == null || url.isEmpty()) {
|
||||||
|
@ -670,7 +615,6 @@ public class SpeciesService {
|
||||||
public boolean isAvailableTaxonomyJobErrorFileById(String jobIdentifier)
|
public boolean isAvailableTaxonomyJobErrorFileById(String jobIdentifier)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
String url = this.executorCall.getErrorLink(jobIdentifier);
|
String url = this.executorCall.getErrorLink(jobIdentifier);
|
||||||
if (url == null || url.isEmpty()) {
|
if (url == null || url.isEmpty()) {
|
||||||
|
@ -700,7 +644,6 @@ public class SpeciesService {
|
||||||
public String createTaxonomyJobForDWCAByChildren(String taxonomyId)
|
public String createTaxonomyJobForDWCAByChildren(String taxonomyId)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
return this.executorCall.createDwCAByChildren(taxonomyId);
|
return this.executorCall.createDwCAByChildren(taxonomyId);
|
||||||
}
|
}
|
||||||
|
@ -722,7 +665,6 @@ public class SpeciesService {
|
||||||
public String createTaxonomyJobForDWCAByIds(List<String> ids)
|
public String createTaxonomyJobForDWCAByIds(List<String> ids)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
Stream<String> keysStream = convert(ids);
|
Stream<String> keysStream = convert(ids);
|
||||||
return executorCall.createDwCAByIds(keysStream);
|
return executorCall.createDwCAByIds(keysStream);
|
||||||
|
@ -744,7 +686,6 @@ public class SpeciesService {
|
||||||
public void cancelTaxonomyJobById(String jobIdentifier) {
|
public void cancelTaxonomyJobById(String jobIdentifier) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
this.executorCall.removeJob(jobIdentifier);
|
this.executorCall.removeJob(jobIdentifier);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
@ -763,7 +704,6 @@ public class SpeciesService {
|
||||||
public CompleteJobStatus getOccurrenceJobById(String jobId) {
|
public CompleteJobStatus getOccurrenceJobById(String jobId) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
return this.executorCall.getStatus(jobId); // CHANGE INTO OCCURRENCE
|
return this.executorCall.getStatus(jobId); // CHANGE INTO OCCURRENCE
|
||||||
// JOB
|
// JOB
|
||||||
// **************************************************************************************
|
// **************************************************************************************
|
||||||
|
@ -793,7 +733,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
return this.executorCall.createCSV(streamKey);
|
return this.executorCall.createCSV(streamKey);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
@ -817,7 +756,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
return this.executorCall.createDarwincoreFromOccurrenceKeys(streamKey);
|
return this.executorCall.createDarwincoreFromOccurrenceKeys(streamKey);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
@ -841,7 +779,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
return this.executorCall.createCSVforOM(streamKey);
|
return this.executorCall.createCSVforOM(streamKey);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
@ -863,7 +800,6 @@ public class SpeciesService {
|
||||||
public void cancelOccurrenceJobById(String jobIdentifier) {
|
public void cancelOccurrenceJobById(String jobIdentifier) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
this.executorCall.removeJob(jobIdentifier); // CHANGE INTO
|
this.executorCall.removeJob(jobIdentifier); // CHANGE INTO
|
||||||
// OCCURRENCE JOB
|
// OCCURRENCE JOB
|
||||||
// **************************************************************************************
|
// **************************************************************************************
|
||||||
|
@ -888,7 +824,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
String url = this.executorCall.getResultLink(jobIdentifier); // CHANGE
|
String url = this.executorCall.getResultLink(jobIdentifier); // CHANGE
|
||||||
// INTO
|
// INTO
|
||||||
|
@ -925,7 +860,6 @@ public class SpeciesService {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
String url = this.executorCall.getErrorLink(jobIdentifier);
|
String url = this.executorCall.getErrorLink(jobIdentifier);
|
||||||
logger.trace("URL returned by species service is: " + url);
|
logger.trace("URL returned by species service is: " + url);
|
||||||
|
@ -955,7 +889,6 @@ public class SpeciesService {
|
||||||
public boolean isAvailableOccurrenceJobErrorFileById(String jobIdentifier)
|
public boolean isAvailableOccurrenceJobErrorFileById(String jobIdentifier)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
try {
|
try {
|
||||||
String url = this.executorCall.getErrorLink(jobIdentifier);
|
String url = this.executorCall.getErrorLink(jobIdentifier);
|
||||||
if (url == null || url.isEmpty()) {
|
if (url == null || url.isEmpty()) {
|
||||||
|
|
|
@ -7,7 +7,6 @@ import org.apache.log4j.Logger;
|
||||||
import org.gcube.application.framework.core.session.ASLSession;
|
import org.gcube.application.framework.core.session.ASLSession;
|
||||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||||
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
import org.gcube.common.homelibrary.home.workspace.Workspace;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
|
@ -27,16 +26,10 @@ public class GetWorkspaceUtil {
|
||||||
throw new Exception("Scope into ASL session is null");
|
throw new Exception("Scope into ASL session is null");
|
||||||
|
|
||||||
String scope = session.getScope().toString();
|
String scope = session.getScope().toString();
|
||||||
|
//logger.trace("Get workspace for scope "+scope);
|
||||||
logger.trace("Get workspace for scope "+scope);
|
//ScopeProvider.instance.set(scope);
|
||||||
|
//logger.trace("ScopeProvider instancied for scope "+scope);
|
||||||
ScopeProvider.instance.set(scope);
|
|
||||||
|
|
||||||
logger.trace("ScopeProvider instancied for scope "+scope);
|
|
||||||
|
|
||||||
logger.trace("retuning workspace for username "+session.getUsername());
|
logger.trace("retuning workspace for username "+session.getUsername());
|
||||||
|
|
||||||
return HomeLibrary.getUserWorkspace(session.getUsername());
|
return HomeLibrary.getUserWorkspace(session.getUsername());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,13 +10,15 @@ import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
public class CommonName implements Serializable {
|
public class CommonName implements IsSerializable, Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -5,11 +5,13 @@ package org.gcube.portlets.user.speciesdiscovery.shared;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Coordinate implements Serializable {
|
public class Coordinate implements IsSerializable, Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package org.gcube.portlets.user.speciesdiscovery.shared;
|
package org.gcube.portlets.user.speciesdiscovery.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
|
@ -15,7 +17,12 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
* Jan 10, 2017
|
* Jan 10, 2017
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
public class DataSource implements IsSerializable{
|
public class DataSource implements IsSerializable, Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -7978955895523864898L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.portlets.user.speciesdiscovery.shared;
|
package org.gcube.portlets.user.speciesdiscovery.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
@ -12,8 +13,12 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
* Jan 10, 2017
|
* Jan 10, 2017
|
||||||
*/
|
*/
|
||||||
public class DataSourceCapability implements IsSerializable{
|
public class DataSourceCapability implements IsSerializable, Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 844266531985842984L;
|
||||||
private ArrayList<SpeciesCapability> listFilters;
|
private ArrayList<SpeciesCapability> listFilters;
|
||||||
private SpeciesCapability capability;
|
private SpeciesCapability capability;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
package org.gcube.portlets.user.speciesdiscovery.shared;
|
package org.gcube.portlets.user.speciesdiscovery.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class DataSourceModel.
|
* The Class DataSourceModel.
|
||||||
|
@ -9,8 +12,12 @@ import java.util.ArrayList;
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
* Jan 10, 2017
|
* Jan 10, 2017
|
||||||
*/
|
*/
|
||||||
public class DataSourceModel extends DataSource {
|
public class DataSourceModel extends DataSource implements IsSerializable, Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -8314335099130160226L;
|
||||||
private ArrayList<DataSourceCapability> listCapabilities;
|
private ArrayList<DataSourceCapability> listCapabilities;
|
||||||
private DataSourceRepositoryInfo dataSourceRepositoryInfo;
|
private DataSourceRepositoryInfo dataSourceRepositoryInfo;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.portlets.user.speciesdiscovery.shared;
|
package org.gcube.portlets.user.speciesdiscovery.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
@ -11,8 +12,12 @@ import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
* Jan 10, 2017
|
* Jan 10, 2017
|
||||||
*/
|
*/
|
||||||
public class DataSourceRepositoryInfo implements IsSerializable{
|
public class DataSourceRepositoryInfo implements IsSerializable, Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -2778021508260771963L;
|
||||||
private String logoUrl;
|
private String logoUrl;
|
||||||
private String pageUrl;
|
private String pageUrl;
|
||||||
private Map<String, String> properties;
|
private Map<String, String> properties;
|
||||||
|
|
|
@ -2,7 +2,9 @@ package org.gcube.portlets.user.speciesdiscovery.shared;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
public enum DownloadState implements Serializable {
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
|
public enum DownloadState implements IsSerializable, Serializable {
|
||||||
PENDING,
|
PENDING,
|
||||||
ONGOING,
|
ONGOING,
|
||||||
ONGOINGWITHFAILURES,
|
ONGOINGWITHFAILURES,
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Set root category priority to WARN and its only appender to A1.
|
||||||
|
log4j.rootCategory=ERROR, A1
|
||||||
|
|
||||||
|
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||||
|
|
||||||
|
|
||||||
|
# A1 uses PatternLayout.
|
||||||
|
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} [%t,%M:%L] %m%n
|
||||||
|
|
||||||
|
|
||||||
|
# Display any warnings generated by our code
|
||||||
|
#log4j.category.org.gcube=trace
|
||||||
|
#log4j.category.org.globus=trace
|
||||||
|
#log4j.category.isclient=INFO
|
||||||
|
#log4j.category.org.gcube.common.homelibrary.jcr=TRACE
|
||||||
|
|
||||||
|
|
||||||
|
log4j.category.org.gcube.portlets.user.workspace=TRACE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
log4j.logger.org.gcube=TRACE
|
||||||
|
log4j.logger.org.gcube.application.framework.core.session=INFO
|
||||||
|
log4j.logger.org.gcube.contentmanager=ERROR
|
||||||
|
log4j.logger.org.gcube.common.scope=ERROR
|
||||||
|
log4j.logger.org.gcube.contentmanagement=ERROR
|
||||||
|
log4j.logger.org.gcube.resources.discovery.icclient=ERROR
|
||||||
|
log4j.logger.org.gcube.common.clients=ERROR
|
||||||
|
#log4j.logger.org.gcube.common.homelibrary.jcr=TRACE
|
||||||
|
log4j.logger.org.gcube.application.framework.accesslogger=ERROR
|
||||||
|
log4j.logger.org.apache.pdfbox.util.PDFStreamEngine=ERROR
|
||||||
|
|
Reference in New Issue