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 8b9badf..85501c6 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 @@ -29,7 +29,7 @@ import org.gcube.application.framework.core.util.SessionConstants; //import org.gcube.common.resources.gcore.Resources; import org.gcube.common.scope.api.ScopeProvider; import org.gcube.informationsystem.publisher.RegistryPublisher; -//import org.gcube.informationsystem.publisher.RegistryPublisherFactory; +import org.gcube.informationsystem.publisher.RegistryPublisherFactory; //import org.gcube.informationsystem.publisher.ScopedPublisher; //import org.gcube.informationsystem.publisher.stubs.registry.faults.PublisherException; import org.gcube.resources.discovery.client.api.DiscoveryClient; @@ -43,8 +43,8 @@ import org.slf4j.LoggerFactory; import static org.gcube.resources.discovery.icclient.ICFactory.*; -//import org.gcube.common.resources.gcore.Resource; -//import org.gcube.common.resources.gcore.ServiceInstance; +import org.gcube.common.resources.gcore.Resource; +import org.gcube.common.resources.gcore.ServiceInstance; /** @@ -317,32 +317,8 @@ public class GenericResource implements GenericResourceInfoI { List scopes=new ArrayList(); scopes.add(session.getScope()); - - - - - - -// org.gcube.common.resources.gcore.GenericResource res = scopedPublisher.create(gCubeRes, scopes); -// logger.info("Created Generic Resource with id: "+res.id()+" on scope: "+scopes.toString()); - - - - - - - - - - - - - - - - - - + org.gcube.common.resources.gcore.GenericResource res = publisher.create(gCubeRes, scopes); + logger.info("Created Generic Resource with id: "+res.id()+" on scope: "+scopes.toString()); // 1-oct-2013 -- adding generic resource to cache logger.info("Adding it also in cache..."); diff --git a/src/main/java/org/gcube/application/framework/core/util/RuntimeResource.java b/src/main/java/org/gcube/application/framework/core/util/RuntimeResource.java index 8cc7412..58135b1 100644 --- a/src/main/java/org/gcube/application/framework/core/util/RuntimeResource.java +++ b/src/main/java/org/gcube/application/framework/core/util/RuntimeResource.java @@ -94,8 +94,8 @@ public class RuntimeResource { * @throws RemoteException */ public String createRuntimeResource(ServiceEndpoint runtimeResource) throws RegistryNotFoundException { -// List scopes = new ArrayList(); -// scopes.add(session.getScope()); + List scopes = new ArrayList(); + scopes.add(session.getScope()); // ServiceEndpoint se = scopedPublisher.create(runtimeResource, scopes); ServiceEndpoint se = registryPublisher.create(runtimeResource); logger.debug("Created Runtime Resource with id: "+se.id()+" on scope: "+scopes.toString());