Class EServiceManager
java.lang.Object
org.gcube.smartgears.connector.resourceregistry.resourcemanager.ResourceManager
org.gcube.smartgears.connector.resourceregistry.resourcemanager.EServiceManager
- Author:
- Luca Frosini (ISTI-CNR)
-
Field Summary
Fields inherited from class org.gcube.smartgears.connector.resourceregistry.resourcemanager.ResourceManager
resourceRegistryPublisher -
Constructor Summary
ConstructorsConstructorDescriptionEServiceManager(org.gcube.smartgears.context.application.ApplicationContext applicationContext) Constructor for EServiceManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the EService to the current context.voidAdds the hosting node to the current context.voidaddToContext(String context) Adds the resource to the specified context.org.gcube.resourcemanagement.model.reference.entities.resources.EServiceCreates a new EService resource.Gets the UUIDs of all contexts where this EService is registered.getState()Gets the current state of the EService.voidremoveFromContext(UUID contextUUID, String context) Removes the resource from the specified context.voidRemoves the resource from the current context.org.gcube.resourcemanagement.model.reference.entities.resources.EServiceUpdates the facets of the EService.Methods inherited from class org.gcube.smartgears.connector.resourceregistry.resourcemanager.ResourceManager
getContextUUID
-
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.ResourceRegistryExceptionAdds the EService to the current context.- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException- if the resource is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the context is not foundorg.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.ResourceRegistryExceptionAdds the hosting node to the current context.- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException- if the resource is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the context is not foundorg.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 foundorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the context is not foundorg.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.ResourceRegistryExceptionRemoves the resource from the current context.- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException- if the resource is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the context is not foundorg.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 contextcontext- the context name- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.entities.resource.ResourceNotFoundException- if the resource is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the context is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs
-
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.ResourceRegistryExceptionCreates 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.ResourceRegistryExceptionUpdates the facets of the EService.- Returns:
- the updated EService
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs
-
getContextsUUID
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
-