public class PredemandeCodeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
constructRedirectionUrl(javax.servlet.http.HttpServletRequest request,
String xPageName,
String viewName,
RequestParameters reqParams)
Build the URL used to redirect user, with specific parameters
|
static int |
getAmountPredemandeCodesInSession(javax.servlet.http.HttpSession session,
String codeValuesSeparator)
Get the total amount of predemande codes entered by the user
|
static List<String> |
getPredemandeCodeList(javax.servlet.http.HttpServletRequest request,
String prefixPredemandeCode,
int totalNumberPersons)
Get a List of all the predemande codes entered by the user
|
static boolean |
hasUniqueValues(List<String> list)
Check if the elements from a List of Strings are unique / distinct
|
static void |
insertPredemandeCodesInSession(javax.servlet.http.HttpSession session,
List<String> predemandeCodeValueList,
String codeValuesSeparator,
String sessionAttributeName)
Add the predemande codes in a session's attributes.
|
public static List<String> getPredemandeCodeList(javax.servlet.http.HttpServletRequest request, String prefixPredemandeCode, int totalNumberPersons)
request - Current HTTP RequestprefixPredemandeCode - The prefix used in the request's parameters to identify a predemande codetotalNumberPersons - Number of people attending the appointmentpublic static String constructRedirectionUrl(javax.servlet.http.HttpServletRequest request, String xPageName, String viewName, RequestParameters reqParams)
request - Current HTTP RequestxPageName - Name of the XPage to displayviewName - Name of the view to display in the XPagereqParams - request parameters used in the URLpublic static void insertPredemandeCodesInSession(javax.servlet.http.HttpSession session,
List<String> predemandeCodeValueList,
String codeValuesSeparator,
String sessionAttributeName)
session - HttpSession where the codes will be addedpredemandeCodeValueList - List of all the predemande codescodeValuesSeparator - String used to separate each code valuepublic static int getAmountPredemandeCodesInSession(javax.servlet.http.HttpSession session,
String codeValuesSeparator)
session - HttpSession where the codes are savedcodeValuesSeparator - String used to separate each code valueCopyright © 2023 City of Paris. All rights reserved.