Interface IFormLifecyclePlugin

    • Method Detail

      • shouldExecute

        boolean shouldExecute​(IFormLifecycleShouldExecuteParams params)
        Optional test to decide whether a form lifecycle plugin should be executed for a particular form request. Use e.g. params.getRequestContext().getRequestType() to check the type of the request.

        Note: Lifecycle plugins may be queued for execution at points were they were not before. Implementations of this method should prefer narrow checks, e.g.

         return params.getFormRequestContext().getRequestType() == EFormRequestType.PROVIDE}
         
        instead of
         return params.getFormRequestContext().getRequestType() != EFormRequestType.PROCESS
         
        Parameters:
        params - Parameters with the current form request.
        Returns:
        true if the plugin should be executed during the lifecycle of the given form request, false otherwise.
        Throws:
        RuntimeException - This method should never throw an exception, but if it does, it is handled as if this method had returned false.