Class SiteMessage

java.lang.Object
fr.paris.lutece.portal.service.message.SiteMessage
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CustomSiteMessage

public class SiteMessage extends Object implements Serializable
The class provides a bean to hold message box informations
See Also:
  • Field Details

  • Constructor Details

    • SiteMessage

      public SiteMessage(String strTextKey, Object[] messageArgs, String strTitleKey, String strUrl, String strTarget, int nType, int nTypeButton, Map<String,Object> requestParameters, String strBackUrl)
      Parameters:
      strTextKey - I18n key for the message body
      messageArgs - Arguments for the strTextKey or null
      strTitleKey - I18n key for the message title
      strUrl - The url for the Ok button
      strTarget - Target for the form (_blank, _self, ...)
      nType - Message type (TYPE_INFO, TYPE_QUESTION, ...)
      nTypeButton - Type of Cancel button
      requestParameters - Request parameters as a Map
      strBackUrl - the back url
  • Method Details

    • getType

      public int getType()
      Get the type of message
      Returns:
      The message type
    • getText

      public String getText(Locale locale)
      Returns the localized text of the message
      Parameters:
      locale - The current locale
      Returns:
      The localized text of the message
    • getTitle

      public String getTitle(Locale locale)
      Returns the localized text of the message
      Parameters:
      locale - The current locale
      Returns:
      The localized text of the message
    • getUrl

      public String getUrl()
      Returns the Url of the message box Ok button
      Returns:
      the Url of the Ok button
    • getTarget

      public String getTarget()
      Returns the Url of the message box Ok button
      Returns:
      the Url of the Ok button
    • getTypeButton

      public int getTypeButton()
      Returns:
      type of button
    • setTypeButton

      public void setTypeButton(int nTypeButton)
      Parameters:
      nTypeButton - The Type of cancel button
    • getRequestParameters

      public Map<String,String> getRequestParameters()
      Returns:
      the request parameters.
    • setBackUrl

      public void setBackUrl(String strBackUrl)
      set the back url
      Parameters:
      strBackUrl - the back url
    • getBackUrl

      public String getBackUrl()
      Returns:
      back url