Renamed class in ISMapper

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-publisher@141894 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-01-30 10:43:18 +00:00
parent b1da72fdf2
commit 3d35c029ab
2 changed files with 11 additions and 11 deletions

View File

@ -25,7 +25,7 @@ import org.gcube.common.clients.delegates.AsyncProxyDelegate;
import org.gcube.common.clients.delegates.ProxyDelegate; import org.gcube.common.clients.delegates.ProxyDelegate;
import org.gcube.common.clients.exceptions.ServiceException; import org.gcube.common.clients.exceptions.ServiceException;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.informationsystem.impl.utils.Entities; import org.gcube.informationsystem.impl.utils.ISMapper;
import org.gcube.informationsystem.model.ISManageable; import org.gcube.informationsystem.model.ISManageable;
import org.gcube.informationsystem.model.entity.Context; import org.gcube.informationsystem.model.entity.Context;
import org.gcube.informationsystem.model.entity.Facet; import org.gcube.informationsystem.model.entity.Facet;
@ -279,7 +279,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
String res = result.toString(); String res = result.toString();
logger.trace("Server returned content : {}", res); logger.trace("Server returned content : {}", res);
return (C) Entities.unmarshal((Class<ISManageable>) clazz, res); return (C) ISMapper.unmarshal((Class<ISManageable>) clazz, res);
} }
} }
@ -297,7 +297,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
stringWriter.append(PATH_SEPARATOR); stringWriter.append(PATH_SEPARATOR);
stringWriter.append(facetClass.getSimpleName()); stringWriter.append(facetClass.getSimpleName());
String body = Entities.marshal(facet); String body = ISMapper.marshal(facet);
HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(),
HTTPMETHOD.PUT, null, body); HTTPMETHOD.PUT, null, body);
@ -326,7 +326,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
stringWriter.append(PATH_SEPARATOR); stringWriter.append(PATH_SEPARATOR);
stringWriter.append(facet.getHeader().getUUID().toString()); stringWriter.append(facet.getHeader().getUUID().toString());
String body = Entities.marshal(facet); String body = ISMapper.marshal(facet);
HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(),
HTTPMETHOD.POST, null, body); HTTPMETHOD.POST, null, body);
@ -383,7 +383,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
stringWriter.append(PATH_SEPARATOR); stringWriter.append(PATH_SEPARATOR);
stringWriter.append(resourceClass.getSimpleName()); stringWriter.append(resourceClass.getSimpleName());
String body = Entities.marshal(resource); String body = ISMapper.marshal(resource);
HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(),
HTTPMETHOD.PUT, null, body); HTTPMETHOD.PUT, null, body);
@ -413,7 +413,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
stringWriter.append(PATH_SEPARATOR); stringWriter.append(PATH_SEPARATOR);
stringWriter.append(resource.getHeader().getUUID().toString()); stringWriter.append(resource.getHeader().getUUID().toString());
String body = Entities.marshal(resource); String body = ISMapper.marshal(resource);
HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(),
HTTPMETHOD.POST, null, body); HTTPMETHOD.POST, null, body);
@ -481,7 +481,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
stringWriter.append(PATH_SEPARATOR); stringWriter.append(PATH_SEPARATOR);
stringWriter.append(consistsOfClass.getSimpleName()); stringWriter.append(consistsOfClass.getSimpleName());
String body = Entities.marshal(consistsOf); String body = ISMapper.marshal(consistsOf);
HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(),
HTTPMETHOD.PUT, null, body); HTTPMETHOD.PUT, null, body);
@ -551,7 +551,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
stringWriter.append(PATH_SEPARATOR); stringWriter.append(PATH_SEPARATOR);
stringWriter.append(isRelatedToClass.getSimpleName()); stringWriter.append(isRelatedToClass.getSimpleName());
String body = Entities.marshal(isRelatedTo); String body = ISMapper.marshal(isRelatedTo);
HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(), HTTPInputs httpInputs = new HTTPInputs(stringWriter.toString(),
HTTPMETHOD.PUT, null, body); HTTPMETHOD.PUT, null, body);

View File

@ -33,7 +33,7 @@ import org.gcube.informationsystem.impl.entity.resource.HostingNodeImpl;
import org.gcube.informationsystem.impl.relation.IsIdentifiedByImpl; import org.gcube.informationsystem.impl.relation.IsIdentifiedByImpl;
import org.gcube.informationsystem.impl.relation.consistsof.HasPersistentMemoryImpl; import org.gcube.informationsystem.impl.relation.consistsof.HasPersistentMemoryImpl;
import org.gcube.informationsystem.impl.relation.consistsof.HasVolatileMemoryImpl; import org.gcube.informationsystem.impl.relation.consistsof.HasVolatileMemoryImpl;
import org.gcube.informationsystem.impl.utils.Entities; import org.gcube.informationsystem.impl.utils.ISMapper;
import org.gcube.informationsystem.model.embedded.Header; import org.gcube.informationsystem.model.embedded.Header;
import org.gcube.informationsystem.model.entity.Facet; import org.gcube.informationsystem.model.entity.Facet;
import org.gcube.informationsystem.model.entity.Resource; import org.gcube.informationsystem.model.entity.Resource;
@ -80,7 +80,7 @@ public class SmartgearResourcesTest extends ScopedTest {
@Test @Test
public void testHostingNode() throws JsonParseException, JsonMappingException, IOException, ResourceRegistryException{ public void testHostingNode() throws JsonParseException, JsonMappingException, IOException, ResourceRegistryException{
HostingNode hostingNode = Entities.unmarshal(HostingNode.class, HOSTING_NODE); HostingNode hostingNode = ISMapper.unmarshal(HostingNode.class, HOSTING_NODE);
logger.debug("Going to create {}", hostingNode); logger.debug("Going to create {}", hostingNode);
hostingNode = resourceRegistryPublisher.createResource(HostingNode.class, hostingNode); hostingNode = resourceRegistryPublisher.createResource(HostingNode.class, hostingNode);
@ -96,7 +96,7 @@ public class SmartgearResourcesTest extends ScopedTest {
@Test @Test
public void testEService() throws JsonParseException, JsonMappingException, IOException, ResourceRegistryException{ public void testEService() throws JsonParseException, JsonMappingException, IOException, ResourceRegistryException{
EService eService = Entities.unmarshal(EService.class, ESERVICE); EService eService = ISMapper.unmarshal(EService.class, ESERVICE);
logger.debug("Going to create {}", eService); logger.debug("Going to create {}", eService);
eService = resourceRegistryPublisher.createResource(EService.class, eService); eService = resourceRegistryPublisher.createResource(EService.class, eService);