public class MessageSourceChain extends Object implements org.springframework.context.MessageSource
MessageSource
that wraps multiple MessageSource
and processes them in sequence. The message is
always taken from the first MessageSource
that returns a non-null
value (if any).Constructor and Description |
---|
MessageSourceChain() |
MessageSourceChain(org.springframework.context.MessageSource... messageSources) |
Modifier and Type | Method and Description |
---|---|
String |
getMessage(org.springframework.context.MessageSourceResolvable resolvable,
Locale locale) |
String |
getMessage(String code,
Object[] args,
Locale locale) |
String |
getMessage(String code,
Object[] args,
String defaultMessage,
Locale locale) |
org.springframework.context.MessageSource[] |
getMessageSources() |
void |
setMessageSources(org.springframework.context.MessageSource[] messageSources) |
public MessageSourceChain()
public MessageSourceChain(org.springframework.context.MessageSource... messageSources)
public String getMessage(String code, Object[] args, String defaultMessage, Locale locale)
getMessage
in interface org.springframework.context.MessageSource
public String getMessage(String code, Object[] args, Locale locale) throws org.springframework.context.NoSuchMessageException
getMessage
in interface org.springframework.context.MessageSource
org.springframework.context.NoSuchMessageException
public String getMessage(org.springframework.context.MessageSourceResolvable resolvable, Locale locale) throws org.springframework.context.NoSuchMessageException
getMessage
in interface org.springframework.context.MessageSource
org.springframework.context.NoSuchMessageException
public org.springframework.context.MessageSource[] getMessageSources()
public void setMessageSources(org.springframework.context.MessageSource[] messageSources)
Copyright © 2011–2020 aiticon GmbH. All rights reserved.