Class FormsUtils
java.lang.Object
fr.paris.lutece.plugins.forms.util.FormsUtils
Utilities for forms
-
Method Summary
Modifier and TypeMethodDescriptiongetFormActionLinkTokens(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...).static StringgetInactiveBypassToken(Form form, String strTimestamp) Get a token to bypass the inactive state of the formsortStepsWithTransitions(List<Step> listSteps, List<Transition> listTransitions) Return a list of steps based on given step list and transition between steps list
-
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 requestlistFormAction- the form actions displayed- Returns:
- the tokens by action
-
getInactiveBypassToken
Get a token to bypass the inactive state of the form- Parameters:
form- the formstrTimestamp- 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 stepslistTransitions- the list of transitions- Returns:
- the list of given steps based on given transitions
-