Java Doc for I18nSupport.java in  » Web-Framework » calyxo » de » odysseus » calyxo » base » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » calyxo » de.odysseus.calyxo.base 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.odysseus.calyxo.base.I18nSupport

All known Subclasses:   de.odysseus.calyxo.struts.base.StrutsI18nSupport,  de.odysseus.calyxo.base.test.TestI18nSupport,  de.odysseus.calyxo.control.impl.DefaultI18nSupport,
I18nSupport
abstract public class I18nSupport (Code)
Abstract internationalization support class. There is one instance per module, which may be retreived via the getInstance() methods. I18n support includes determination of a request's desired locale, resource lookup and message construction(a message is a resource with parameters). The basic principle here is, that internationalized content may be determined by specifying a locale, a bundle name and a resource key. Beyond that, there are no further requirements. Bundle aliases may be registered using the addBundleAlias method.
author:
   Christoph Beck


Field Summary
final public static  StringI18N_SUPPORT_KEY
     Module scope key where the i18n support instance is stored.


Method Summary
final public static  I18nSupportgetInstance(HttpServletRequest request)
    
final public static  I18nSupportgetInstance(PageContext pageContext)
     Convenience method.
final public static  I18nSupportgetInstance(ModuleContext context)
    
abstract public  LocalegetLocale(HttpServletRequest request)
     Get the desired locale for the specified request.
final public  LocalegetLocale(PageContext pageContext)
     Convenience method.
final public  StringgetMessage(Locale locale, String bundle, String key, Object[] args)
    
final public  StringgetResource(Locale locale, String bundle, String key)
     Get a resource string.
abstract protected  StringlookupMessage(Locale locale, String bundle, String key, Object[] args)
    
abstract protected  StringlookupResource(Locale locale, String bundle, String key)
     Lookup a resource string.
public  StringresolveBundle(String bundle)
     Get unaliased bundle name.
Parameters:
  bundle - the bundle name or alias if the specified bundle name is an alias set with I18nSupport.setBundleAlias(String,String),the associated name is returned.
public  voidsetBundleAlias(String alias, String bundle)
     Set bundle alias. When resolving resources and messages, bundle names may be aliased.
abstract public  voidsetLocale(HttpServletRequest request, Locale locale)
     Set the desired locale for the specified request.
public  voidsetLocale(PageContext pageContext, Locale locale)
     Convenience method.

Field Detail
I18N_SUPPORT_KEY
final public static String I18N_SUPPORT_KEY(Code)
Module scope key where the i18n support instance is stored.





Method Detail
getInstance
final public static I18nSupport getInstance(HttpServletRequest request)(Code)
Lookup i18n support for module determined by specified request



getInstance
final public static I18nSupport getInstance(PageContext pageContext)(Code)
Convenience method.
See Also:   I18nSupport.getInstance(HttpServletRequest)



getInstance
final public static I18nSupport getInstance(ModuleContext context)(Code)
Lookup i18n support for specified module



getLocale
abstract public Locale getLocale(HttpServletRequest request)(Code)
Get the desired locale for the specified request. An implementation may choose to cache the locale in session scope and answer that value here.



getLocale
final public Locale getLocale(PageContext pageContext)(Code)
Convenience method.
See Also:   I18nSupport.getLocale(HttpServletRequest)



getMessage
final public String getMessage(Locale locale, String bundle, String key, Object[] args)(Code)
Get a message string
Parameters:
  locale - the desired locale
Parameters:
  bundle - the bundle name or alias
Parameters:
  key - the resource key
Parameters:
  args - message arguments message string



getResource
final public String getResource(Locale locale, String bundle, String key)(Code)
Get a resource string.
Parameters:
  locale - the desired locale
Parameters:
  bundle - the bundle name or alias
Parameters:
  key - the resource key resource string



lookupMessage
abstract protected String lookupMessage(Locale locale, String bundle, String key, Object[] args)(Code)
Lookup a message string
Parameters:
  locale - the desired locale
Parameters:
  bundle - the bundle name
Parameters:
  key - the resource key
Parameters:
  args - message arguments message string



lookupResource
abstract protected String lookupResource(Locale locale, String bundle, String key)(Code)
Lookup a resource string.
Parameters:
  locale - the desired locale
Parameters:
  bundle - the bundle name
Parameters:
  key - the resource key resource string



resolveBundle
public String resolveBundle(String bundle)(Code)
Get unaliased bundle name.
Parameters:
  bundle - the bundle name or alias if the specified bundle name is an alias set with I18nSupport.setBundleAlias(String,String),the associated name is returned. Otherwise, the specified bundle name is returned.



setBundleAlias
public void setBundleAlias(String alias, String bundle)(Code)
Set bundle alias. When resolving resources and messages, bundle names may be aliased. The alias will be removed if the specified bundle is null or equal to the alias name. Otherwise, bundle names passed to subsequent calls of I18nSupport.getMessage(Locale,String,String,Object[]) and I18nSupport.getResource(Locale,String,String) will be aliased as specified here.
Parameters:
  alias - the alias name
Parameters:
  bundle - the bundle name



setLocale
abstract public void setLocale(HttpServletRequest request, Locale locale)(Code)
Set the desired locale for the specified request. An implementation may choose to cache the locale set here in session scope and answer that value in subsequent calls of getLocale() methods.



setLocale
public void setLocale(PageContext pageContext, Locale locale)(Code)
Convenience method.
See Also:   I18nSupport.setLocale(HttpServletRequest,Locale)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.