Generalizing solution by using HTTPCall provided by API

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@144238 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-02-24 10:25:32 +00:00
parent ab7399343e
commit 4473b8e201
2 changed files with 6 additions and 6 deletions

View File

@ -8,12 +8,12 @@ import javax.xml.ws.EndpointReference;
import org.gcube.common.clients.Call;
import org.gcube.informationsystem.resourceregistry.api.rest.httputils.HTTPCall;
public class ResourceRegistryCall<C> implements Call<EndpointReference, C> {
public class ResourceRegistryClientCall<C> implements Call<EndpointReference, C> {
protected final Class<C> clazz;
protected final HTTPCall<C> httpCall;
public ResourceRegistryCall(Class<C> clazz, HTTPCall<C> httpCall) {
public ResourceRegistryClientCall(Class<C> clazz, HTTPCall<C> httpCall) {
this.clazz = clazz;
this.httpCall = httpCall;
}

View File

@ -67,7 +67,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
HTTPCall<ERType> httpCall = new HTTPCall<>(stringWriter.toString(),
HTTPMETHOD.GET, null);
ResourceRegistryCall<ERType> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<ERType> call = new ResourceRegistryClientCall<>(
clazz, httpCall);
ERType erType = delegate.make(call);
@ -100,7 +100,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
HTTPCall<String> httpCall = new HTTPCall<>(stringWriter.toString(),
HTTPMETHOD.GET, parameters);
ResourceRegistryCall<String> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<String> call = new ResourceRegistryClientCall<>(
String.class, httpCall);
String ret = delegate.make(call);
@ -138,7 +138,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
HTTPCall<String> httpCall = new HTTPCall<>(stringWriter.toString(),
HTTPMETHOD.GET, parameters);
ResourceRegistryCall<String> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<String> call = new ResourceRegistryClientCall<>(
String.class, httpCall);
String ret = delegate.make(call);
@ -175,7 +175,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
HTTPCall<String> httpCall = new HTTPCall<>(stringWriter.toString(),
HTTPMETHOD.GET, parameters);
ResourceRegistryCall<String> call = new ResourceRegistryCall<>(
ResourceRegistryClientCall<String> call = new ResourceRegistryClientCall<>(
String.class, httpCall);
String schema = delegate.make(call);
logger.info("Got schema for {} is {}", type, schema);