java.lang.Object
org.gcube.vremanagement.executor.ispublisher.ISPublisher
Direct Known Subclasses:
GCoreISPublisher, RestISPublisher

public abstract class ISPublisher extends Object
Abstract base class for Information System publishers. This class manages the publishing and unpublishing of plugins to the gCube Information System.
Author:
Luca Frosini (ISTI - CNR)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.gcube.smartgears.context.application.ApplicationContext
    The application context.
    protected static List<ISPublisher>
    List of available IS publishers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ISPublisher(org.gcube.smartgears.context.application.ApplicationContext applicationContext)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    getISPublishers(org.gcube.smartgears.context.application.ApplicationContext applicationContext)
    Get the list of available IS publishers.
    abstract void
    publishPlugins(Map<String,Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> availablePlugins)
    Publish the available plugins to the Information System.
    abstract void
    unpublishPlugins(boolean force)
    Unpublish plugins from the Information System.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • isPublishers

      protected static List<ISPublisher> isPublishers
      List of available IS publishers.
    • applicationContext

      protected org.gcube.smartgears.context.application.ApplicationContext applicationContext
      The application context.
  • Constructor Details

    • ISPublisher

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

    • getISPublishers

      public static List<ISPublisher> getISPublishers(org.gcube.smartgears.context.application.ApplicationContext applicationContext)
      Get the list of available IS publishers.
      Parameters:
      applicationContext - the application context
      Returns:
      the list of IS publishers
    • publishPlugins

      public abstract void publishPlugins(Map<String,Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> availablePlugins) throws Exception
      Publish the available plugins to the Information System.
      Parameters:
      availablePlugins - map of available plugins
      Throws:
      Exception - if the publishing fails
    • unpublishPlugins

      public abstract void unpublishPlugins(boolean force) throws Exception
      Unpublish plugins from the Information System.
      Parameters:
      force - whether to force the unpublishing even if some plugins are still running
      Throws:
      Exception - if the unpublishing fails