Class AdminMessageService
java.lang.Object
fr.paris.lutece.portal.service.message.AdminMessageService
This class provides a service that build messages and deliver the Url to display them
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetFormattedList(List<String> list, Locale locale) Format a list of item to include in a messagestatic StringgetLogoutMessageUrl(jakarta.servlet.http.HttpServletRequest request) Build the logout message urlstatic AdminMessagegetMessage(jakarta.servlet.http.HttpServletRequest request) Returns the message associated to the current requeststatic StringReturn relative url for the admin message jsp.static StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, int nMessageType) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, int nMessageType) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strUrl, int nMessageType) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strTitleKey, String strUrl, String strTarget, int nMessageType) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strTitleKey, String strUrl, String strTarget, int nMessageType, Map<String, Object> requestParameters) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strTitleKey, String strUrl, String strTarget, int nMessageType, Map<String, Object> requestParameters, String strBackUrl) Returns the Url that display the given message.static StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, int nMessageType) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, int nMessageType, Map requestParameters) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, String strTarget) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, String strTarget, int nMessageType) Returns the Url that display the given messagestatic StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, List<? extends ErrorMessage> errors) Returns the Url that display the given messagestatic <T> StringgetMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Set<jakarta.validation.ConstraintViolation<T>> constraintViolations) Returns the Url that display the given messagestatic booleanisLogoutMessageUrl(jakarta.servlet.http.HttpServletRequest request) Checks if the message url is the logout message url
-
Method Details
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey) Returns the Url that display the given message- Parameters:
request- The HttpRequeststrMessageKey- The message key- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, int nMessageType) Returns the Url that display the given message- Parameters:
request- The HttpRequeststrMessageKey- The message keynMessageType- The message type- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, int nMessageType) Returns the Url that display the given message- Parameters:
messageArgs- Message argumentsrequest- The HttpRequeststrMessageKey- The message keynMessageType- The message type- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, String strTarget) Returns the Url that display the given message- Parameters:
strTarget- Targetrequest- The HttpRequeststrMessageKey- The message keystrUrl- The Url of the OK button- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, String strTarget, int nMessageType) Returns the Url that display the given message- Parameters:
strTarget- The url target if not "_self"request- The HttpRequeststrMessageKey- The message keystrUrl- The Url of the Ok buttonnMessageType- The message type- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, int nMessageType) Returns the Url that display the given message- Parameters:
request- The HttpRequeststrMessageKey- The message keystrUrl- The Url of the Ok buttonnMessageType- The message type- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, String strUrl, int nMessageType, Map requestParameters) Returns the Url that display the given message- Parameters:
request- The HttpRequeststrMessageKey- The message keystrUrl- The Url of the Ok buttonnMessageType- The message typerequestParameters- a collection of parameters- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strUrl, int nMessageType) Returns the Url that display the given message- Parameters:
messageArgs- Message Argumentsrequest- The HttpRequeststrMessageKey- The message keystrUrl- The Url of the Ok buttonnMessageType- The message type- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strTitleKey, String strUrl, String strTarget, int nMessageType) Returns the Url that display the given message- Parameters:
messageArgs- Message ArgumentsstrTarget- The url target if not "_self"strTitleKey- The title keynMessageType- The message typerequest- The HttpRequeststrMessageKey- The message keystrUrl- The Url of the Ok button- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strTitleKey, String strUrl, String strTarget, int nMessageType, Map<String, Object> requestParameters) Returns the Url that display the given message- Parameters:
messageArgs- Message ArgumentsstrTarget- The url target if not "_self"strTitleKey- The title keynMessageType- The message typerequest- The HttpRequeststrMessageKey- The message keystrUrl- The Url of the Ok buttonrequestParameters- a collection of parameters- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static <T> String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Set<jakarta.validation.ConstraintViolation<T>> constraintViolations) Returns the Url that display the given message- Type Parameters:
T- The type of the bean that has been validated- Parameters:
request- The HTTP requeststrMessageKey- The message keyconstraintViolations- The set of violations- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, List<? extends ErrorMessage> errors) Returns the Url that display the given message- Parameters:
request- The HTTP requeststrMessageKey- The message keyerrors- The set of violations- Returns:
- The Url of the JSP that display the message
-
getMessageUrl
public static String getMessageUrl(jakarta.servlet.http.HttpServletRequest request, String strMessageKey, Object[] messageArgs, String strTitleKey, String strUrl, String strTarget, int nMessageType, Map<String, Object> requestParameters, String strBackUrl) Returns the Url that display the given message.- Parameters:
request- The HttpRequeststrMessageKey- The message keymessageArgs- Message ArgumentsstrTitleKey- The title keystrUrl- The Url of the Ok buttonstrTarget- The url target if not "_self"nMessageType- The message typerequestParameters- a collection of parametersstrBackUrl- the str back url- Returns:
- The Url of the JSP that display the message
-
getMessage
Returns the message associated to the current request- Parameters:
request- The HttpRequest- Returns:
- The message associated to the current request
-
getMessageRelativeUrl
Return relative url for the admin message jsp. This method does not generate admin message.- Returns:
- The relative url
-
getFormattedList
Format a list of item to include in a message- Parameters:
list- The list of item as stringlocale- The current locale- Returns:
- The formatted list
-
getLogoutMessageUrl
Build the logout message url- Parameters:
request- The HTTP request- Returns:
- The Url
-
isLogoutMessageUrl
public static boolean isLogoutMessageUrl(jakarta.servlet.http.HttpServletRequest request) Checks if the message url is the logout message url- Parameters:
request- The HTTP request- Returns:
- True if the url is the logout message url
-