From fb5cb30cd01031df58ef2a71b9ecd7be66b68d3e Mon Sep 17 00:00:00 2001 From: "nikolas.laskaris" Date: Thu, 20 Feb 2014 14:45:58 +0000 Subject: [PATCH] git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerCore@91989 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../application/framework/core/util/GenericResource.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/application/framework/core/util/GenericResource.java b/src/main/java/org/gcube/application/framework/core/util/GenericResource.java index 7fdf654..e3d9376 100644 --- a/src/main/java/org/gcube/application/framework/core/util/GenericResource.java +++ b/src/main/java/org/gcube/application/framework/core/util/GenericResource.java @@ -125,7 +125,6 @@ public class GenericResource implements GenericResourceInfoI { } - /** * @return the name of the active VRE */ @@ -453,9 +452,16 @@ public class GenericResource implements GenericResourceInfoI { } public List getGenericResourcesByType(String type) throws RemoteException { + return getGenericResourcesByType(session.getScope(), type); + } + + + public static List getGenericResourcesByType(String scope, String type) throws RemoteException { + ScopeProvider.instance.set(scope); List output = new ArrayList(); SimpleQuery queryMan = null; try { + client = clientFor(org.gcube.common.resources.gcore.GenericResource.class); queryMan = queryFor(org.gcube.common.resources.gcore.GenericResource.class); queryMan.addCondition("$resource/Profile/SecondaryType eq '"+type+"'"); List results = client.submit(queryMan); @@ -468,6 +474,7 @@ public class GenericResource implements GenericResourceInfoI { } } + /** * @param id the id of the generic resource