org.sonatype.sisu.goodies.i18n
Class AggregateMessageSource

java.lang.Object
  extended by org.sonatype.sisu.goodies.common.ComponentSupport
      extended by org.sonatype.sisu.goodies.i18n.AggregateMessageSource
All Implemented Interfaces:
MessageSource

public class AggregateMessageSource
extends ComponentSupport
implements MessageSource

A message source which aggregates messages sources in order.

Since:
1.0

Field Summary
 
Fields inherited from class org.sonatype.sisu.goodies.common.ComponentSupport
log
 
Constructor Summary
AggregateMessageSource(List<MessageSource> sources)
           
AggregateMessageSource(MessageSource... sources)
           
 
Method Summary
 String format(String code, Object... args)
           
 String getMessage(String code)
           
 String getMessage(String code, String defaultValue)
           
 List<MessageSource> getSources()
           
 
Methods inherited from class org.sonatype.sisu.goodies.common.ComponentSupport
createLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateMessageSource

public AggregateMessageSource(List<MessageSource> sources)

AggregateMessageSource

public AggregateMessageSource(MessageSource... sources)
Method Detail

getSources

public List<MessageSource> getSources()

getMessage

public String getMessage(String code)
Specified by:
getMessage in interface MessageSource

getMessage

public String getMessage(String code,
                         String defaultValue)
Specified by:
getMessage in interface MessageSource

format

public String format(String code,
                     Object... args)
Specified by:
format in interface MessageSource


Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.