Class RestISPublisher
java.lang.Object
org.gcube.vremanagement.executor.ispublisher.ISPublisher
org.gcube.vremanagement.executor.ispublisher.RestISPublisher
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final UUIDThe unique identifier for this eService instance.protected org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientClient for interacting with the Resource Registry.protected org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisherPublisher for managing resources in the Resource Registry.Fields inherited from class org.gcube.vremanagement.executor.ispublisher.ISPublisher
applicationContext, isPublishers -
Constructor Summary
ConstructorsConstructorDescriptionRestISPublisher(org.gcube.smartgears.context.application.ApplicationContext applicationContext) Constructor for REST-based Information System publisher. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacetgetPluginAccessPointFacet(org.gcube.vremanagement.executor.plugin.Plugin plugin, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) Create an access point facet for a specific plugin.protected URIgetPluginEndpoint(String pluginName, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) Get the endpoint URI for a specific plugin.protected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacetgetSmartExecutorAccessPointFacet(org.gcube.resourcemanagement.model.reference.entities.resources.EService smartExecutorEService) Get the access point facet for the SmartExecutor service.protected URIgetSmartExecutorEndpoint(org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) Get the endpoint URI for the SmartExecutor service.voidpublishPlugins(Map<String, Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> availablePlugins) Publish the available plugins to the Information System.protected org.gcube.resourcemanagement.model.reference.entities.resources.RunningPluginpublishRunningPluginWithRelations(org.gcube.vremanagement.executor.plugin.Plugin plugin, UUID pluginUUID) Publish a running plugin along with its relations to the Information System.voidunpublishPlugins(boolean force) Unpublish plugins from the Information System.Methods inherited from class org.gcube.vremanagement.executor.ispublisher.ISPublisher
getISPublishers
-
Field Details
-
eServiceUUID
The unique identifier for this eService instance. -
resourceRegistryClient
protected org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient resourceRegistryClientClient for interacting with the Resource Registry. -
resourceRegistryPublisher
protected org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher resourceRegistryPublisherPublisher for managing resources in the Resource Registry.
-
-
Constructor Details
-
RestISPublisher
public RestISPublisher(org.gcube.smartgears.context.application.ApplicationContext applicationContext) Constructor for REST-based Information System publisher.- Parameters:
applicationContext- the application context
-
-
Method Details
-
getPluginEndpoint
protected URI getPluginEndpoint(String pluginName, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) throws Exception Get the endpoint URI for a specific plugin.- Parameters:
pluginName- the name of the pluginsmartExecutorAccessPointFacet- the access point facet of the SmartExecutor- Returns:
- the plugin endpoint URI
- Throws:
Exception- if the endpoint creation fails
-
getPluginAccessPointFacet
protected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet getPluginAccessPointFacet(org.gcube.vremanagement.executor.plugin.Plugin plugin, org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) throws Exception Create an access point facet for a specific plugin.- Parameters:
plugin- the plugin for which to create the access point facetsmartExecutorAccessPointFacet- the access point facet of the SmartExecutor- Returns:
- the access point facet for the plugin
- Throws:
Exception- if the access point facet creation fails
-
getSmartExecutorAccessPointFacet
protected org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet getSmartExecutorAccessPointFacet(org.gcube.resourcemanagement.model.reference.entities.resources.EService smartExecutorEService) Get the access point facet for the SmartExecutor service.- Parameters:
smartExecutorEService- the SmartExecutor eService- Returns:
- the access point facet for the SmartExecutor
-
getSmartExecutorEndpoint
protected URI getSmartExecutorEndpoint(org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet smartExecutorAccessPointFacet) throws URISyntaxException Get the endpoint URI for the SmartExecutor service.- Parameters:
smartExecutorAccessPointFacet- the access point facet of the SmartExecutor- Returns:
- the SmartExecutor endpoint URI
- Throws:
URISyntaxException- if the URI creation fails
-
publishRunningPluginWithRelations
protected org.gcube.resourcemanagement.model.reference.entities.resources.RunningPlugin publishRunningPluginWithRelations(org.gcube.vremanagement.executor.plugin.Plugin plugin, UUID pluginUUID) throws Exception Publish a running plugin along with its relations to the Information System.- Parameters:
plugin- the plugin to publishpluginUUID- the unique identifier for the plugin execution- Returns:
- the published running plugin resource
- Throws:
Exception- if the publishing fails
-
publishPlugins
public void publishPlugins(Map<String, Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> availablePlugins) throws ExceptionDescription copied from class:ISPublisherPublish the available plugins to the Information System.- Specified by:
publishPluginsin classISPublisher- Parameters:
availablePlugins- map of available plugins- Throws:
Exception- if the publishing fails
-
unpublishPlugins
Description copied from class:ISPublisherUnpublish plugins from the Information System.- Specified by:
unpublishPluginsin classISPublisher- Parameters:
force- whether to force the unpublishing even if some plugins are still running- Throws:
Exception- if the unpublishing fails
-