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