org.apache.myfaces.extensions.cdi.message.api
Interface MessageContext

All Superinterfaces:
LocaleResolver, MessageHandler, Serializable

public interface MessageContext
extends LocaleResolver, MessageHandler, Serializable

Central context for handling messages


Method Summary
 void addMessage(Message message)
           
 MessageContext cloneContext()
           
 MessageContextConfig config()
           
 MessageBuilder message()
           
<T extends MessageContext>
T
typed(Class<T> contextType)
           
 
Methods inherited from interface org.apache.myfaces.extensions.cdi.message.api.LocaleResolver
getLocale
 
Methods inherited from interface org.apache.myfaces.extensions.cdi.message.api.MessageHandler
addMessage, addMessageFilter, getMessageFilters, getMessages, removeAllMessages, removeMessage
 

Method Detail

message

MessageBuilder message()
Returns:
message builder to add and/or create a new message based on the current context via a fluent api

config

MessageContextConfig config()
Returns:
the current config to change it or create a new one base on the current config

typed

<T extends MessageContext> T typed(Class<T> contextType)
Parameters:
contextType - the type of the custom implementation
Returns:
the instance of the current message context to use the api of the concrete implementation

cloneContext

MessageContext cloneContext()
Returns:
creates a new context based on the current one

addMessage

void addMessage(Message message)
Parameters:
message - a message which should be added to the current context (message handlers)


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.