com.clickntap.smart
Class SmartMessageSource

java.lang.Object
  extended by com.clickntap.smart.SmartMessageSource
All Implemented Interfaces:
org.springframework.context.MessageSource
Direct Known Subclasses:
SmartJsonMessageSource

public class SmartMessageSource
extends Object
implements org.springframework.context.MessageSource


Field Summary
protected  org.springframework.core.io.Resource messageResource
           
protected  ScriptEngine scriptEngine
           
 
Constructor Summary
SmartMessageSource()
           
 
Method Summary
 String getMessage(org.springframework.context.MessageSourceResolvable messageSource, Locale locale)
           
 String getMessage(String code, Object[] args, Locale locale)
           
 String getMessage(String code, Object[] args, String ignored, Locale locale)
           
 void setMessageResource(org.springframework.core.io.Resource messageResource)
           
 void setScriptEngine(ScriptEngine scriptEngine)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scriptEngine

protected ScriptEngine scriptEngine

messageResource

protected org.springframework.core.io.Resource messageResource
Constructor Detail

SmartMessageSource

public SmartMessageSource()
Method Detail

start

public void start()
           throws Exception
Throws:
Exception

setMessageResource

public void setMessageResource(org.springframework.core.io.Resource messageResource)
                        throws IOException
Throws:
IOException

setScriptEngine

public void setScriptEngine(ScriptEngine scriptEngine)

getMessage

public String getMessage(String code,
                         Object[] args,
                         String ignored,
                         Locale locale)
Specified by:
getMessage in interface org.springframework.context.MessageSource

getMessage

public String getMessage(String code,
                         Object[] args,
                         Locale locale)
                  throws org.springframework.context.NoSuchMessageException
Specified by:
getMessage in interface org.springframework.context.MessageSource
Throws:
org.springframework.context.NoSuchMessageException

getMessage

public String getMessage(org.springframework.context.MessageSourceResolvable messageSource,
                         Locale locale)
                  throws org.springframework.context.NoSuchMessageException
Specified by:
getMessage in interface org.springframework.context.MessageSource
Throws:
org.springframework.context.NoSuchMessageException


Copyright © 2014. All rights reserved.