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;
import org.gcube.common.clients.GCubeEndpoint;
import javax.xml.ws.EndpointReference;
import org.gcube.common.clients.config.ProxyConfig;
import org.gcube.common.clients.delegates.ProxyDelegate;
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/
*
*/
public class ResourceRegistryRegistryPlugin extends AbstractPlugin<GCubeEndpoint, ResourceRegistryPublisher>{
public class ResourceRegistryRegistryPlugin extends AbstractPlugin<EndpointReference, ResourceRegistryPublisher>{
public ResourceRegistryRegistryPlugin(){
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
public GCubeEndpoint resolve(GCubeEndpoint address, ProxyConfig<?, ?> config)
throws Exception {
public EndpointReference resolve(EndpointReference address,
ProxyConfig<?, ?> config) throws Exception {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.gcube.common.clients.delegates.ProxyPlugin#newProxy(org.gcube.common.clients.delegates.ProxyDelegate)
*/
@Override
public ResourceRegistryPublisher newProxy(
ProxyDelegate<GCubeEndpoint> delegate) {
return new ResourceRegistryPublisher(delegate);
ProxyDelegate<EndpointReference> delegate) {
// TODO Auto-generated method stub
return null;
}
}

View File

@ -3,8 +3,9 @@
*/
package org.gcube.informationsystem.resourceregistry.publisher.proxy;
import javax.xml.ws.EndpointReference;
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.ProxyDelegate;
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 {
private final AsyncProxyDelegate<GCubeEndpoint> delegate;
private final AsyncProxyDelegate<EndpointReference> delegate;
public ResourceRegistryPublisher(ProxyDelegate<GCubeEndpoint> config) {
this.delegate = new AsyncProxyDelegate<GCubeEndpoint>(config);
public ResourceRegistryPublisher(ProxyDelegate<EndpointReference> config) {
this.delegate = new AsyncProxyDelegate<EndpointReference>(config);
}
@Override
public String createFacet(String facetType, String jsonRepresentation)
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
return null;
};