Class ResourceRegistryClientFactory

java.lang.Object
org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientFactory

public class ResourceRegistryClientFactory extends Object
Factory for ResourceRegistryClient instances. This is the recommended entry point for obtaining a client: it resolves the Resource Registry service URL for the current (or a given) context via ServiceInstance and wires up a ResourceRegistryClientImpl pointed at it.
Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • ResourceRegistryClientFactory

      public ResourceRegistryClientFactory()
  • Method Details

    • getResourceRegistryURL

      public static String getResourceRegistryURL()
      Gets the Resource Registry service URL using the current context.
      Returns:
      The complete URL for the Resource Registry service (see ServiceInstance.getResourceRegistryURL())
    • getResourceRegistryURL

      public static String getResourceRegistryURL(String context)
      Gets the Resource Registry service URL for a specific context.
      Parameters:
      context - The context to use for determining the service URL
      Returns:
      The complete URL for the Resource Registry service in the specified context (see ServiceInstance.getResourceRegistryURL(String))
    • create

      public static ResourceRegistryClient create()
      Creates a new ResourceRegistryClient instance using the current context.
      Returns:
      A new ResourceRegistryClient instance configured for the current context
    • create

      public static ResourceRegistryClient create(String context)
      Creates a new ResourceRegistryClient instance for a specific context.
      Parameters:
      context - The context to use for the ResourceRegistryClient instance
      Returns:
      A new ResourceRegistryClient instance configured for the specified context