fr.paris.lutece.portal.service.message
Class SiteMessage

java.lang.Object
  extended by fr.paris.lutece.portal.service.message.SiteMessage
All Implemented Interfaces:
java.io.Serializable

public class SiteMessage
extends java.lang.Object
implements java.io.Serializable

The class provides a bean to hold message box informations

See Also:
Serialized Form

Field Summary
static int TYPE_BUTTON_BACK
           
static int TYPE_BUTTON_CANCEL
           
static int TYPE_BUTTON_HIDDEN
           
static int TYPE_CONFIRMATION
           
static int TYPE_ERROR
           
static int TYPE_INFO
           
static int TYPE_QUESTION
           
static int TYPE_STOP
           
static int TYPE_WARNING
           
 
Constructor Summary
SiteMessage(java.lang.String strTextKey, java.lang.Object[] messageArgs, java.lang.String strTitleKey, java.lang.String strUrl, java.lang.String strTarget, int nType, boolean bCancelButton)
          Deprecated.  
SiteMessage(java.lang.String strTextKey, java.lang.Object[] messageArgs, java.lang.String strTitleKey, java.lang.String strUrl, java.lang.String strTarget, int nType, int nTypeButton, java.util.Map<java.lang.String,java.lang.Object> requestParameters, java.lang.String strBackUrl)
           
 
Method Summary
 java.lang.String getBackUrl()
           
 java.util.Map<java.lang.String,java.lang.String> getRequestParameters()
           
 java.lang.String getTarget()
          Returns the Url of the message box Ok button
 java.lang.String getText(java.util.Locale locale)
          Returns the localized text of the message
 java.lang.String getTitle(java.util.Locale locale)
          Returns the localized text of the message
 int getType()
          Get the type of message
 int getTypeButton()
           
 java.lang.String getUrl()
          Returns the Url of the message box Ok button
 boolean isCancel()
          Deprecated.  
 void setBackUrl(java.lang.String _strBackUrl)
          set the back url
 void setCancel(boolean bCancel)
          Deprecated.  
 void setTypeButton(int nTypeButton)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_INFO

public static final int TYPE_INFO
See Also:
Constant Field Values

TYPE_QUESTION

public static final int TYPE_QUESTION
See Also:
Constant Field Values

TYPE_ERROR

public static final int TYPE_ERROR
See Also:
Constant Field Values

TYPE_WARNING

public static final int TYPE_WARNING
See Also:
Constant Field Values

TYPE_CONFIRMATION

public static final int TYPE_CONFIRMATION
See Also:
Constant Field Values

TYPE_STOP

public static final int TYPE_STOP
See Also:
Constant Field Values

TYPE_BUTTON_HIDDEN

public static final int TYPE_BUTTON_HIDDEN
See Also:
Constant Field Values

TYPE_BUTTON_BACK

public static final int TYPE_BUTTON_BACK
See Also:
Constant Field Values

TYPE_BUTTON_CANCEL

public static final int TYPE_BUTTON_CANCEL
See Also:
Constant Field Values
Constructor Detail

SiteMessage

public SiteMessage(java.lang.String strTextKey,
                   java.lang.Object[] messageArgs,
                   java.lang.String strTitleKey,
                   java.lang.String strUrl,
                   java.lang.String strTarget,
                   int nType,
                   int nTypeButton,
                   java.util.Map<java.lang.String,java.lang.Object> requestParameters,
                   java.lang.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

SiteMessage

public SiteMessage(java.lang.String strTextKey,
                   java.lang.Object[] messageArgs,
                   java.lang.String strTitleKey,
                   java.lang.String strUrl,
                   java.lang.String strTarget,
                   int nType,
                   boolean bCancelButton)
Deprecated. 

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, ...)
bCancelButton - True if Cancel button is necessary
Method Detail

getType

public int getType()
Get the type of message

Returns:
The message type

isCancel

public boolean isCancel()
Deprecated. 

return True if button is required

Returns:
True if button is required in message

setCancel

public void setCancel(boolean bCancel)
Deprecated. 

set cancel button value

Parameters:
bCancel - True if Cancel button is required (set with default type)

getText

public java.lang.String getText(java.util.Locale locale)
Returns the localized text of the message

Parameters:
locale - The current locale
Returns:
The localized text of the message

getTitle

public java.lang.String getTitle(java.util.Locale locale)
Returns the localized text of the message

Parameters:
locale - The current locale
Returns:
The localized text of the message

getUrl

public java.lang.String getUrl()
Returns the Url of the message box Ok button

Returns:
the Url of the Ok button

getTarget

public java.lang.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 java.util.Map<java.lang.String,java.lang.String> getRequestParameters()
Returns:
the request parameters.

setBackUrl

public void setBackUrl(java.lang.String _strBackUrl)
set the back url

Parameters:
_strBackUrl - the back url

getBackUrl

public java.lang.String getBackUrl()
Returns:
back url


Copyright © 2012 Mairie de Paris. All Rights Reserved.