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

All Superinterfaces:
Serializable

public interface MessageBuilder
extends Serializable

Author:
Gerhard Petracek

Method Summary
 Message add()
          adds the message which was built via the fluent api
 MessageBuilder argument(Serializable... arguments)
           
 Message create()
           
 MessageBuilder namedArgument(String name, Serializable value)
          helper method to add named arguments easily
 MessageBuilder payload(MessagePayload... messagePayload)
           
 MessageBuilder text(String messageDescriptor)
           
 String toText()
           
 

Method Detail

payload

MessageBuilder payload(MessagePayload... messagePayload)
Parameters:
messagePayload - payload for the current message
Returns:
the current instance of the message builder to allow a fluent api

text

MessageBuilder text(String messageDescriptor)
Parameters:
messageDescriptor - message key (or inline-text) for the current message
Returns:
the current instance of the message builder to allow a fluent api

argument

MessageBuilder argument(Serializable... arguments)
Parameters:
arguments - numbered and/or named argument(s) for the current message
Returns:
the current instance of the message builder to allow a fluent api

namedArgument

MessageBuilder namedArgument(String name,
                             Serializable value)
helper method to add named arguments easily

Parameters:
name - the name/key of the named argument
value - the value of the named argument
Returns:
the current instance of the message builder to allow a fluent api

add

Message add()
adds the message which was built via the fluent api

Returns:
the message which was built via the fluent api

create

Message create()
Returns:
the message which was built via the fluent api

toText

String toText()
Returns:
the text of the message which was built via the fluent api


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