Create and initialize the context client in the base request.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@160618 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2017-12-17 02:44:39 +00:00
parent 6f73b07dcb
commit d6bdcd615f
5 changed files with 16 additions and 1 deletions

View File

@ -3,6 +3,7 @@
<name>resource-manager</name>
<comment></comment>
<projects>
<project>resource-registry-context-client</project>
</projects>
<buildSpec>
<buildCommand>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

View File

@ -78,6 +78,12 @@
<groupId>org.gcube.information-system</groupId>
<artifactId>gcube-resources</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.information-system</groupId>
<artifactId>resource-registry-context-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- jersey -->
<dependency>

View File

@ -1,5 +1,8 @@
package org.gcube.resourcemanagement.manager.webapp.context;
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClient;
import org.gcube.informationsystem.resourceregistry.context.ResourceRegistryContextClientFactory;
/**
* Base request to an operation exposed by the Resource Registry.
*
@ -10,6 +13,9 @@ public abstract class RequestToResourceRegistry {
protected String forceURL = "";
protected ResourceRegistryContextClient resourceRegistryContextClient =
ResourceRegistryContextClientFactory.create();
/**
* Forces to use a RR instance at the given url.
*

View File

@ -27,7 +27,7 @@ public class ResponseFromResourceRegistry {
* Gets the message associated to the response
* @return the message
*/
public Optional<String> getMessage() {
public Optional<String> getMessage() {
return Optional.ofNullable(message);
}