public class MessageRepository extends Object
Modifier and Type | Field and Description |
---|---|
static String |
KEY |
protected static Logger |
logger
create a static logger.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessage(GenericMessage msg) |
void |
clearGlobalMessage() |
String |
forwardMessage(String url)
forward the main globalMessage to the next request (for forwarding).
|
GenericMessage |
getGlobalMessage() |
I18nMessage |
getI18nMessage(String key) |
static MessageRepository |
getInstance(ContentContext inCtx) |
static MessageRepository |
getInstance(javax.servlet.http.HttpServletRequest request) |
GenericMessage |
getMessage(String key) |
String |
getParameterName() |
String |
getRawGlobalMessage() |
boolean |
haveGlobalMessage() |
boolean |
haveMessages() |
Collection<GenericMessage> |
outAllMessages() |
void |
setGlobalMessage(GenericMessage globalMessage)
set a new global message. if the type of the current message is more
important or equal the new message is ignored.
|
void |
setGlobalMessageAndNotification(ContentContext ctx,
GenericMessage globalMessage) |
void |
setGlobalMessageAndNotification(ContentContext ctx,
GenericMessage globalMessage,
boolean admin)
set a new global message. if the type of the current message is more
important or equal the new message is ignored.
|
void |
setGlobalMessageAndNotificationToAll(ContentContext ctx,
GenericMessage globalMessage,
boolean admin)
set a new global message. if the type of the current message is more
important or equal the new message is ignored.
|
void |
setGlobalMessageForced(GenericMessage globalMessage)
set a new global message. if the type of the current message is more
important or equal the new message is ignored.
|
public static final String KEY
protected static Logger logger
public static final MessageRepository getInstance(ContentContext inCtx)
public static final MessageRepository getInstance(javax.servlet.http.HttpServletRequest request)
public String forwardMessage(String url)
url
- a url to pagepublic String getRawGlobalMessage()
public String getParameterName()
public void addMessage(GenericMessage msg)
public Collection<GenericMessage> outAllMessages()
public GenericMessage getMessage(String key)
public I18nMessage getI18nMessage(String key) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public GenericMessage getGlobalMessage()
public void setGlobalMessage(GenericMessage globalMessage)
globalMessage
- a global messagepublic void setGlobalMessageForced(GenericMessage globalMessage)
globalMessage
- a global messagepublic void setGlobalMessageAndNotificationToAll(ContentContext ctx, GenericMessage globalMessage, boolean admin)
globalMessage
- a global messagepublic void setGlobalMessageAndNotification(ContentContext ctx, GenericMessage globalMessage)
public void setGlobalMessageAndNotification(ContentContext ctx, GenericMessage globalMessage, boolean admin)
globalMessage
- a global messagepublic void clearGlobalMessage()
public boolean haveMessages()
public boolean haveGlobalMessage()
Copyright © 2012-2018. All Rights Reserved.