diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientFactory.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientFactory.java index 763eeb8..01fb5ef 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientFactory.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientFactory.java @@ -12,14 +12,24 @@ public class ResourceRegistrySchemaClientFactory { private static final Logger logger = LoggerFactory.getLogger(ResourceRegistrySchemaClientFactory.class); - public static ResourceRegistrySchemaClient create() { + public static String getResourceRegistryURL() { String address = String.format("%s/%s", ServiceInstance.getServiceURL(),Constants.SERVICE_NAME); + return address; + } + + public static String getResourceRegistryURL(String context) { + String address = String.format("%s/%s", ServiceInstance.getServiceURL(context),Constants.SERVICE_NAME); + return address; + } + + public static ResourceRegistrySchemaClient create() { + String address = getResourceRegistryURL(); logger.trace("The {} will be contacted at {}", Constants.SERVICE_NAME, address); return new ResourceRegistrySchemaClientImpl(address); } public static ResourceRegistrySchemaClient create(String context) { - String address = String.format("%s/%s", ServiceInstance.getServiceURL(context),Constants.SERVICE_NAME); + String address = getResourceRegistryURL(context); logger.trace("The {} will be contacted at {}", Constants.SERVICE_NAME, address); return new ResourceRegistrySchemaClientImpl(address); }