nikolas.laskaris 2016-07-21 08:17:48 +00:00
parent e6d9f3c3ee
commit 2df3d3113c
2 changed files with 7 additions and 31 deletions

View File

@ -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<String> scopes=new ArrayList<String>();
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...");

View File

@ -94,8 +94,8 @@ public class RuntimeResource {
* @throws RemoteException
*/
public String createRuntimeResource(ServiceEndpoint runtimeResource) throws RegistryNotFoundException {
// List<String> scopes = new ArrayList<String>();
// scopes.add(session.getScope());
List<String> scopes = new ArrayList<String>();
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());