serializaion of Exception added to client
git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/Common/storagehub-client@178794 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
96ae37a85f
commit
1560dbaa11
|
@ -15,16 +15,19 @@
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
|
13
.project
13
.project
|
@ -5,6 +5,11 @@
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
|
@ -15,9 +20,17 @@
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|
|
@ -9,4 +9,5 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
org.eclipse.jdt.core.compiler.source=1.8
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
<wb-module deploy-name="storagehub-client_TRUNK">
|
||||||
|
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||||
|
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
|
||||||
|
</wb-module>
|
||||||
|
</project-modules>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<faceted-project>
|
||||||
|
<installed facet="java" version="1.8"/>
|
||||||
|
<installed facet="jst.utility" version="1.0"/>
|
||||||
|
</faceted-project>
|
|
@ -8,6 +8,7 @@ import org.gcube.common.calls.jaxrs.TargetFactory;
|
||||||
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.common.gxrest.request.GXWebTargetAdapterRequest;
|
import org.gcube.common.gxrest.request.GXWebTargetAdapterRequest;
|
||||||
|
import org.gcube.common.gxrest.response.entity.SerializableErrorEntityTextReader;
|
||||||
import org.gcube.common.storagehub.client.Constants;
|
import org.gcube.common.storagehub.client.Constants;
|
||||||
import org.gcube.common.storagehub.client.proxies.DefaultItemManager;
|
import org.gcube.common.storagehub.client.proxies.DefaultItemManager;
|
||||||
import org.gcube.common.storagehub.client.proxies.ItemManagerClient;
|
import org.gcube.common.storagehub.client.proxies.ItemManagerClient;
|
||||||
|
@ -39,7 +40,9 @@ public class ItemManagerPlugin extends AbstractPlugin<GXWebTargetAdapterRequest,
|
||||||
String address = child.getTextContent();
|
String address = child.getTextContent();
|
||||||
//GXWebTargetAdapterRequest request = GXWebTargetAdapterRequest.newRequest(address).path(this.name).path("items");
|
//GXWebTargetAdapterRequest request = GXWebTargetAdapterRequest.newRequest(address).path(this.name).path("items");
|
||||||
GcubeService service = GcubeService.service().withName(Constants.MANAGER_QNAME).andPath("items");
|
GcubeService service = GcubeService.service().withName(Constants.MANAGER_QNAME).andPath("items");
|
||||||
return TargetFactory.stubFor(service).getAsGxRest(address);
|
GXWebTargetAdapterRequest requestAdapter = TargetFactory.stubFor(service).getAsGxRest(address);
|
||||||
|
requestAdapter.register(SerializableErrorEntityTextReader.class);
|
||||||
|
return requestAdapter;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.gcube.common.calls.jaxrs.TargetFactory;
|
||||||
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.common.gxrest.request.GXWebTargetAdapterRequest;
|
import org.gcube.common.gxrest.request.GXWebTargetAdapterRequest;
|
||||||
|
import org.gcube.common.gxrest.response.entity.SerializableErrorEntityTextReader;
|
||||||
import org.gcube.common.storagehub.client.Constants;
|
import org.gcube.common.storagehub.client.Constants;
|
||||||
import org.gcube.common.storagehub.client.proxies.DefaultWorkspaceManager;
|
import org.gcube.common.storagehub.client.proxies.DefaultWorkspaceManager;
|
||||||
import org.gcube.common.storagehub.client.proxies.WorkspaceManagerClient;
|
import org.gcube.common.storagehub.client.proxies.WorkspaceManagerClient;
|
||||||
|
@ -38,6 +39,9 @@ public class WorkspaceManagerPlugin extends AbstractPlugin<GXWebTargetAdapterReq
|
||||||
Node child=node.getFirstChild();
|
Node child=node.getFirstChild();
|
||||||
String address = child.getTextContent();
|
String address = child.getTextContent();
|
||||||
GcubeService service = GcubeService.service().withName(Constants.MANAGER_QNAME).useRootPath();
|
GcubeService service = GcubeService.service().withName(Constants.MANAGER_QNAME).useRootPath();
|
||||||
return TargetFactory.stubFor(service).getAsGxRest(address);
|
|
||||||
|
GXWebTargetAdapterRequest requestAdapter = TargetFactory.stubFor(service).getAsGxRest(address);
|
||||||
|
requestAdapter.register(SerializableErrorEntityTextReader.class);
|
||||||
|
return requestAdapter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue