Class PluginExecutor


  • public class PluginExecutor
    extends Object
    Utility class with some static methods for executing plugins related to the lifecycle of forms.
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • PluginExecutor

        public PluginExecutor()
    • Method Detail

      • executeFormPreRender

        public static Map<String,​IPluginFormPreRenderRetVal> executeFormPreRender​(UserContext uc,
                                                                                        Mandant mandant,
                                                                                        IPluginFormPreRenderParams params)
        Runs all pre-render plugins for the given client, and returns all results the plugins returned.
        Parameters:
        uc - The current user context, current not used.
        mandant - The current client for which to execute the plugins.
        params - The parameters that are passed to the pre-render plugins.
        Returns:
        A map between the name of each successfully executed per-render plugin and its return value.
      • executeFormPrePersist

        public static Map<String,​IPluginFormPrePersistRetVal> executeFormPrePersist​(UserContext uc,
                                                                                          Mandant mandant,
                                                                                          IPluginFormPrePersistParams params)
        Runs all pre-persist plugins for the given client, and returns all results the plugins returned.
        Parameters:
        uc - The current user context, current not used.
        mandant - The current client for which to execute the plugins.
        params - The parameters that are passed to the pre-persist plugins.
        Returns:
        A map between the name of each successfully executed per-persist plugin and its return value.
      • executeFormPreProcess

        public static Map<String,​IPluginFormPreProcessRetVal> executeFormPreProcess​(UserContext uc,
                                                                                          Mandant mandant,
                                                                                          IPluginFormPreProcessParams params)
        Runs all pre-persist plugins for the given client, and returns all results the plugins returned.
        Parameters:
        uc - The current user context, current not used.
        mandant - The current client for which to execute the plugins.
        params - The parameters that are passed to the pre-process plugins.
        Returns:
        A map between the name of each successfully executed per-process plugin and its return value.
      • executeFormPreResponse

        public static Map<String,​IPluginFormPreRespondRetVal> executeFormPreResponse​(UserContext uc,
                                                                                           Mandant mandant,
                                                                                           IPluginFormPreRespondParams params)
        Runs all pre-respond plugins for the given client, and returns all results the plugins returned.
        Parameters:
        uc - The current user context, current not used.
        mandant - The current client for which to execute the plugins.
        params - The parameters that are passed to the pre-respond plugins.
        Returns:
        A map between the name of each successfully executed per-process plugin and its return value.
      • executeGenericPlugin

        public static IPluginGenericRetVal executeGenericPlugin​(UserContext uc,
                                                                String pluginName,
                                                                Mandant mandant,
                                                                IPluginGenericParams params)
        Runs the generic plugin with the given name, and returns the result the plugin returned.
        Parameters:
        uc - The current user context, current not used.
        pluginName - Name of the generic plugin to execute.
        mandant - The current client for which to execute the plugin.
        params - The parameters that are passed to the generic plugin.
        Returns:
        The value returned by the generic plugin.
      • executeGenericPlugin

        public static IPluginGenericRetVal executeGenericPlugin​(IPluginGeneric plugin,
                                                                IPluginGenericParams params)
                                                         throws FCPluginException
        Executes a single generic plugin.
        Parameters:
        plugin - Plugin to execute.
        params - Parameters that are passed to the generic plugin.
        Returns:
        The return value of the plugin, or null if it did not return a value (or the given plugin is null).
        Throws:
        FCPluginException - When this exception is thrown by the plugin.
      • executeDatenquelle

        public static IPluginDataSourceRetVal executeDatenquelle​(UserContext uc,
                                                                 String datasourceName,
                                                                 Mandant mandant,
                                                                 IPluginDataSourceParams params)
        Runs the data source plugin with the given name, and returns the result the plugin returned.
        Parameters:
        uc - The current user context, current not used.
        datasourceName - Name of the data source plugin to execute.
        mandant - The current client for which to execute the plugin.
        params - The parameters that are passed to the generic plugin.
        Returns:
        The value as returned by the data source plugin.
      • executeServletActionPlugin

        public static IPluginServletActionRetVal executeServletActionPlugin​(UserContext uc,
                                                                            String pluginName,
                                                                            Mandant mandant,
                                                                            IPluginServletActionParams params)
        Runs the servlet action plugin with the given name, and returns the result the plugin returned.
        Parameters:
        uc - The current user context, current not used.
        pluginName - The name of the servlet action plugin to execute.
        mandant - The current client for which to execute the plugin.
        params - The parameters that are passed to the servlet action plugin.
        Returns:
        The value as returned by the servlet action plugin.