Interface IPluginSystemReplacer

  • All Superinterfaces:
    IFCPlugin, INamedUiElement, INameProviding, ITransferable, Serializable

    public interface IPluginSystemReplacer
    extends IFCPlugin
    Interface for a system replacer plugin. This plugin can add support for additional system placeholders. A system placeholder is a placeholder with a pattern as defined CmnConst.PH_PATTERN_SYSTEM:
     [%$PLACEHOLDER_NAME%]
     
    Please note these placeholder plugins are run before the built-in system placeholder replacer. As such, when a system placeholder was already processed and replaced by a plugin, the built-in placeholder will not be applied anymore. Also, when multiple system placeholder replacer plugins are installed, there are not guarantees made regarding the order in which the replacer plugins are applied.
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • replace

        IPluginSystemReplacerRetVal replace​(IPluginSystemReplacerParams params)
                                     throws FCPluginException
        This is the main method of this plugin that should perform the placeholder replacement. This method is once for each encountered placeholder and passed the name of that placeholder. This plugin does not have to handle each placeholder. Return the name of the placeholder to indicate that this plugin cannot handle that placeholder.

        When any exception other than FCPluginException is thrown, the current process is aborted. For example, when the form is submitted and the workflow is run, this would result in an internal server error and a generic error HTML reponse page.

        Parameters:
        params - The parameters this plugin may make use of, such as the placeholder to be replaced and the current workflow context.
        Returns:
        The value to be used as the replacement for the given placeholder. In case you do not wish to replace the given placeholder (and let it be handled by another placeholder plugin or the default replacer), return the name of the placeholder, ie. IPluginGenericReplacerParams.getPlaceholderContent().
        Throws:
        FCPluginException - May be thrown when this plugin cannot perform the replacement. When an error is thrown, the placeholder is not replaced and may be replaced by another plugin.