Package org.wso2.carbon.ui
Class CarbonUIMessage
- java.lang.Object
-
- org.wso2.carbon.ui.CarbonUIMessage
-
- All Implemented Interfaces:
Serializable
public class CarbonUIMessage extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CarbonUIMessage(String message, String messageType)TODO: Make this constructor privateCarbonUIMessage(String message, String messageType, Exception exception)TODO: Make this constructor privateCarbonUIMessage(String message, String messageType, Exception exception, boolean showStackTrace)TODO: Make this constructor private
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExceptiongetException()StringgetMessage()StringgetMessageType()booleanisShowStackTrace()static voidsendCarbonUIMessage(String message, String messageType, javax.servlet.http.HttpServletRequest request)Creates CarbonUIMessage, set it to the sessionstatic voidsendCarbonUIMessage(String message, String messageType, javax.servlet.http.HttpServletRequest request, Exception exception)Creates error CarbonUIMessage, set it to the sessionstatic voidsendCarbonUIMessage(String message, String messageType, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String urlToRedirect)Creates CarbonUIMessage, set it to the session and redirect it to the given urlstatic CarbonUIMessagesendCarbonUIMessage(String message, String messageType, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String urlToRedirect, Exception exception)Creates error CarbonUIMessage, set it to the session and redirect it to the given url with the exception objectvoidsetException(Exception exception)voidsetShowStackTrace(boolean showStackTrace)
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
INFO
public static final String INFO
- See Also:
- Constant Field Values
-
ERROR
public static final String ERROR
- See Also:
- Constant Field Values
-
WARNING
public static final String WARNING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMessageType
public String getMessageType()
-
getMessage
public String getMessage()
-
getException
public Exception getException()
-
setException
public void setException(Exception exception)
-
isShowStackTrace
public boolean isShowStackTrace()
-
setShowStackTrace
public void setShowStackTrace(boolean showStackTrace)
-
sendCarbonUIMessage
public static void sendCarbonUIMessage(String message, String messageType, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String urlToRedirect) throws IOException
Creates CarbonUIMessage, set it to the session and redirect it to the given url- Parameters:
message- meesage to be displayedmessageType- info, warning, errorrequest-response-urlToRedirect-- Throws:
IOException
-
sendCarbonUIMessage
public static CarbonUIMessage sendCarbonUIMessage(String message, String messageType, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String urlToRedirect, Exception exception) throws IOException
Creates error CarbonUIMessage, set it to the session and redirect it to the given url with the exception object- Parameters:
message-messageType-request-response-urlToRedirect-exception-- Returns:
- Throws:
IOException
-
sendCarbonUIMessage
public static void sendCarbonUIMessage(String message, String messageType, javax.servlet.http.HttpServletRequest request)
Creates CarbonUIMessage, set it to the session- Parameters:
message-messageType-request-
-
-