Class FormsUtils

java.lang.Object
fr.paris.lutece.plugins.forms.util.FormsUtils

public class FormsUtils extends Object
Utilities for forms
  • Method Details

    • getFormActionLinkTokens

      public static Map<String,String> getFormActionLinkTokens(jakarta.servlet.http.HttpServletRequest request, List<FormAction> listFormAction)
      Get a security token for each action of a controller called by the URL of a form action (duplicateForm...). The core checks the token of an action called by a link as the parameter _csrftoken.
      Parameters:
      request - the request
      listFormAction - the form actions displayed
      Returns:
      the tokens by action
    • getInactiveBypassToken

      public static String getInactiveBypassToken(Form form, String strTimestamp)
      Get a token to bypass the inactive state of the form
      Parameters:
      form - the form
      strTimestamp - the timestamp for the start of the bypass period
      Returns:
      a token
    • sortStepsWithTransitions

      public static List<Step> sortStepsWithTransitions(List<Step> listSteps, List<Transition> listTransitions)
      Return a list of steps based on given step list and transition between steps list
      Parameters:
      listSteps - the list of steps
      listTransitions - the list of transitions
      Returns:
      the list of given steps based on given transitions