Fixing clients

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-publisher@131294 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-09-12 13:23:00 +00:00
parent 8d731f1e43
commit ddec0efa10
2 changed files with 23 additions and 12 deletions

View File

@ -3,7 +3,8 @@
*/ */
package org.gcube.informationsystem.resourceregistry.publisher.plugin; package org.gcube.informationsystem.resourceregistry.publisher.plugin;
import org.gcube.common.clients.GCubeEndpoint; import javax.xml.ws.EndpointReference;
import org.gcube.common.clients.config.ProxyConfig; import org.gcube.common.clients.config.ProxyConfig;
import org.gcube.common.clients.delegates.ProxyDelegate; import org.gcube.common.clients.delegates.ProxyDelegate;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
@ -13,7 +14,7 @@ import org.gcube.informationsystem.resourceregistry.publisher.proxy.ResourceRegi
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/ * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* *
*/ */
public class ResourceRegistryRegistryPlugin extends AbstractPlugin<GCubeEndpoint, ResourceRegistryPublisher>{ public class ResourceRegistryRegistryPlugin extends AbstractPlugin<EndpointReference, ResourceRegistryPublisher>{
public ResourceRegistryRegistryPlugin(){ public ResourceRegistryRegistryPlugin(){
super(ResourceRegistryRegistryPlugin.class.getSimpleName()); super(ResourceRegistryRegistryPlugin.class.getSimpleName());
@ -39,17 +40,26 @@ public class ResourceRegistryRegistryPlugin extends AbstractPlugin<GCubeEndpoint
} }
/* (non-Javadoc)
* @see org.gcube.common.clients.delegates.ProxyPlugin#resolve(java.lang.Object, org.gcube.common.clients.config.ProxyConfig)
*/
@Override @Override
public GCubeEndpoint resolve(GCubeEndpoint address, ProxyConfig<?, ?> config) public EndpointReference resolve(EndpointReference address,
throws Exception { ProxyConfig<?, ?> config) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return null; return null;
} }
/* (non-Javadoc)
* @see org.gcube.common.clients.delegates.ProxyPlugin#newProxy(org.gcube.common.clients.delegates.ProxyDelegate)
*/
@Override @Override
public ResourceRegistryPublisher newProxy( public ResourceRegistryPublisher newProxy(
ProxyDelegate<GCubeEndpoint> delegate) { ProxyDelegate<EndpointReference> delegate) {
return new ResourceRegistryPublisher(delegate); // TODO Auto-generated method stub
return null;
} }
} }

View File

@ -3,8 +3,9 @@
*/ */
package org.gcube.informationsystem.resourceregistry.publisher.proxy; package org.gcube.informationsystem.resourceregistry.publisher.proxy;
import javax.xml.ws.EndpointReference;
import org.gcube.common.clients.Call; import org.gcube.common.clients.Call;
import org.gcube.common.clients.GCubeEndpoint;
import org.gcube.common.clients.delegates.AsyncProxyDelegate; 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;
@ -25,18 +26,18 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.Schema
*/ */
public class ResourceRegistryPublisher implements ContextManagement, SchemaManagement, EntityManagement { public class ResourceRegistryPublisher implements ContextManagement, SchemaManagement, EntityManagement {
private final AsyncProxyDelegate<GCubeEndpoint> delegate; private final AsyncProxyDelegate<EndpointReference> delegate;
public ResourceRegistryPublisher(ProxyDelegate<GCubeEndpoint> config) { public ResourceRegistryPublisher(ProxyDelegate<EndpointReference> config) {
this.delegate = new AsyncProxyDelegate<GCubeEndpoint>(config); this.delegate = new AsyncProxyDelegate<EndpointReference>(config);
} }
@Override @Override
public String createFacet(String facetType, String jsonRepresentation) public String createFacet(String facetType, String jsonRepresentation)
throws ResourceRegistryException { throws ResourceRegistryException {
Call<GCubeEndpoint, String> call = new Call<GCubeEndpoint, String>() { Call<EndpointReference, String> call = new Call<EndpointReference, String>() {
public String call(GCubeEndpoint endpoint) throws Exception { public String call(EndpointReference endpoint) throws Exception {
// TODO // TODO
return null; return null;
}; };