java.lang.Object
org.gcube.smartgears.connector.resourceregistry.resourcemanager.ResourceManager
org.gcube.smartgears.connector.resourceregistry.resourcemanager.EServiceManager

public class EServiceManager extends ResourceManager
Author:
Luca Frosini (ISTI-CNR)
  • Constructor Details

    • EServiceManager

      public EServiceManager(org.gcube.smartgears.context.application.ApplicationContext applicationContext)
      Constructor for EServiceManager.
      Parameters:
      applicationContext - the application context
  • Method Details

    • addEServiceToCurrentContext

      public void addEServiceToCurrentContext() throws org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Adds the EService to the current context.
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException - if the resource is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the context is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs
    • addHostingNodeToCurrentContext

      public void addHostingNodeToCurrentContext() throws org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Adds the hosting node to the current context.
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException - if the resource is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the context is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs
    • addToContext

      public void addToContext(String context) throws org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Adds the resource to the specified context.
      Parameters:
      context - the context to add to
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException - if the resource is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the context is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs
    • removeFromCurrentContext

      public void removeFromCurrentContext() throws org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Removes the resource from the current context.
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException - if the resource is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the context is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs
    • removeFromContext

      public void removeFromContext(UUID contextUUID, String context) throws org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Removes the resource from the specified context.
      Parameters:
      contextUUID - the UUID of the context
      context - the context name
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException - if the resource is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the context is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs
    • getState

      public String getState()
      Gets the current state of the EService.
      Returns:
      the state as a string
    • createEService

      public org.gcube.resourcemanagement.model.reference.entities.resources.EService createEService() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Creates a new EService resource.
      Returns:
      the created EService
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs
    • updateFacets

      public org.gcube.resourcemanagement.model.reference.entities.resources.EService updateFacets() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Updates the facets of the EService.
      Returns:
      the updated EService
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs
    • getContextsUUID

      public Map<UUID,String> getContextsUUID() throws Exception
      Gets the UUIDs of all contexts where this EService is registered.
      Returns:
      a map of context UUIDs to their names
      Throws:
      Exception - if an error occurs