org.jboss.seam.international.status.builder
Interface TemplateMessage

All Superinterfaces:
MessageBuilder

public interface TemplateMessage
extends MessageBuilder

This MessageBuilder creates Message objects by interpolating templates with values supplied as parameters.

For example: Given the following Message m

 Message m = MessageFactory.info("There are {0} cars, and they are all {1}.", 5, "green").build();
 

A subsequent call to m.getSummary() will return:
"There are 5 cars, and they are all green.";

Author:
Lincoln Baxter, III, Sebastian Sachtleben

Method Summary
 TemplateMessage detail(String detail)
          Set the detail text for this message.
 TemplateMessage detailParams(Object... detailParams)
          Set the parameters for detail text of this builder's template.
 TemplateMessage level(Level level)
          Set the severity, level of importance of this message.
 TemplateMessage targets(String targets)
          Set the targets for this message.
 TemplateMessage text(String summary)
          Set the template for this message.
 TemplateMessage textParams(Object... summaryParams)
          Set the parameters for this builder's template.
 
Methods inherited from interface org.jboss.seam.international.status.MessageBuilder
build
 

Method Detail

text

TemplateMessage text(String summary)
Set the template for this message.

Any expressions of the form "{0}, {1} ... {N}" found in the template will be interpolated; numbers reference the index of any given parameters, and can be used more than once per template.


detail

TemplateMessage detail(String detail)
Set the detail text for this message.

Any expressions of the form "{0}, {1} ... {N}" found in the template will be interpolated; numbers reference the index of any given parameters, and can be used more than once per template.


textParams

TemplateMessage textParams(Object... summaryParams)
Set the parameters for this builder's template.

Parameters may be referenced by index in the template, using expressions of the form "{0}, {1} ... {N}"


detailParams

TemplateMessage detailParams(Object... detailParams)
Set the parameters for detail text of this builder's template.

Parameters may be referenced by index in the template, using expressions of the form "{0}, {1} ... {N}"


targets

TemplateMessage targets(String targets)
Set the targets for this message. If supported by the consuming view-layer, these targets may control where/how the message is displayed to the user.


level

TemplateMessage level(Level level)
Set the severity, level of importance of this message.



Copyright © 2011 Seam Framework. All Rights Reserved.