PageRenderTime 24ms CodeModel.GetById 15ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/webccr/src/com/emis/caesar/emisNLS.java

https://bitbucket.org/sanliou/synccr
Java | 41 lines | 22 code | 10 blank | 9 comment | 3 complexity | dcfb4e34c48021f644291d8238589dac MD5 | raw file
 1package com.emis.caesar;
 2
 3import java.util.HashMap;
 4
 5/*
 6 *  There are two resource file relative to NLS 
 7 *  
 8 *  one is classes/caesar_nls.properties 
 9 *  one is WEB-INF/caesar_nls_user.properties
10 * 
11 *  each locale should load from these two file as well
12 * 
13 */
14public class emisNLS {
15	
16	static HashMap g_NLSInstance = new HashMap();
17			
18	public static synchronized emisNLS getLocale(String area) {
19		 area = area.toUpperCase();
20		 emisNLS nls = (emisNLS) g_NLSInstance.get(area);
21		 if(  nls == null ) {
22			 nls = new emisNLS(area);
23			 g_NLSInstance.put(area, nls);
24		 }
25		 return nls;
26	}
27	
28	
29	HashMap nlsResource = new HashMap();
30	
31	private emisNLS(String area) {
32		
33	}
34	
35	public String getString( String idString ) {
36		if (idString==null) return "";
37		idString = idString.toUpperCase();
38		return (String) nlsResource.get(idString);
39	}
40
41}