Class NotificationsPlugin

  • All Implemented Interfaces:
    org.gcube.application.cms.plugins.EventListenerPluginInterface, org.gcube.application.cms.plugins.InitializablePlugin, org.gcube.application.cms.plugins.Plugin

    public class NotificationsPlugin
    extends org.gcube.application.cms.plugins.implementations.AbstractPlugin
    implements org.gcube.application.cms.plugins.EventListenerPluginInterface
    The Class NotificationsPlugin.
    Author:
    Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Jan 30, 2024
    • Constructor Detail

      • NotificationsPlugin

        public NotificationsPlugin()
    • Method Detail

      • init

        public org.gcube.application.cms.plugins.reports.InitializationReport init()
                                                                            throws org.gcube.application.cms.plugins.faults.InitializationException
        Inits the.
        Specified by:
        init in interface org.gcube.application.cms.plugins.InitializablePlugin
        Returns:
        the initialization report
        Throws:
        org.gcube.application.cms.plugins.faults.InitializationException - the initialization exception
      • getDescriptor

        public org.gcube.application.geoportal.common.model.plugins.PluginDescriptor getDescriptor()
        Gets the descriptor.
        Specified by:
        getDescriptor in interface org.gcube.application.cms.plugins.Plugin
        Returns:
        the descriptor
      • initInContext

        public org.gcube.application.cms.plugins.reports.InitializationReport initInContext()
                                                                                     throws org.gcube.application.cms.plugins.faults.InitializationException
        Inits the in context.
        Specified by:
        initInContext in interface org.gcube.application.cms.plugins.InitializablePlugin
        Returns:
        the initialization report
        Throws:
        org.gcube.application.cms.plugins.faults.InitializationException - the initialization exception
      • checkIfSubscribedEvent

        public boolean checkIfSubscribedEvent​(org.gcube.application.cms.plugins.events.ItemObserved<org.gcube.application.geoportal.common.model.document.Project> observerd)
        Check if subscribed event.
        Parameters:
        observerd - the observerd
        Returns:
        true, if successful
      • getNotificationBindingMapPerContext

        protected Map<String,​NotificationEventsSubscribedConfig> getNotificationBindingMapPerContext()
        Gets the notification binding map per context.
        Returns:
        the notification binding map per context
      • readNotificationsSubscribedFromConfigurationInTheUCD

        public NotificationEventsSubscribedConfig readNotificationsSubscribedFromConfigurationInTheUCD​(org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor useCaseDescriptor)
                                                                                                throws Exception
        Read notifications subscribed from configuration in the UCD.
        Parameters:
        useCaseDescriptor - the use case descriptor
        Returns:
        the notification events subscribed config
        Throws:
        Exception - the exception
      • shutdown

        public void shutdown()
                      throws org.gcube.application.cms.plugins.faults.ShutDownException
        Shutdown.
        Specified by:
        shutdown in interface org.gcube.application.cms.plugins.InitializablePlugin
        Throws:
        org.gcube.application.cms.plugins.faults.ShutDownException - the shut down exception
      • doAction

        public void doAction​(org.gcube.application.cms.plugins.events.ItemObserved<org.gcube.application.geoportal.common.model.document.Project> itemObserved)
        Do action.
        Specified by:
        doAction in interface org.gcube.application.cms.plugins.EventListenerPluginInterface
        Parameters:
        itemObserved - the item observed