Java Doc for LocaleManager.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » i18n » 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 » Portal » uPortal_rel 2 6 1 GA » org.jasig.portal.i18n 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jasig.portal.i18n.LocaleManager

LocaleManager
public class LocaleManager implements Serializable(Code)
Manages locales on behalf of a user. This class currently keeps track of locales at the following levels:
  1. User's locale preferences (associated with a user ID)
  2. Browser's locale preferences (from the Accept-Language request header)
  3. Session's locale preferences (set via the portal request parameter uP_locales)
  4. Portal's locale preferences (set in portal.properties)
Eventually, this class will also keep track of locale preferences at the following levels:
  1. Layout node's locale preferences
  2. User profile's locale preferences

author:
   Shoji Kajita kajita@itc.nagoya-u.ac.jp
author:
   Ken Weiner, kweiner@unicon.net
version:
   $Revision: 35884 $


Field Summary
final public static  booleanDEFAULT_LOCALE_AWARE
     Default value for localeAware.

Constructor Summary
public  LocaleManager(IPerson person)
     Constructor that associates a locale manager with a user.
public  LocaleManager(IPerson person, String acceptLanguage)
     Constructor that sets up locales according to the Accept-Language request header from a user's browser.

Method Summary
public  Locale[]getBrowserLocales()
    
public static  LocalegetJvmLocale()
    
public  Locale[]getLocales()
     Produces a sorted list of locales according to locale preferences obtained from several places.
public static  Locale[]getPortalLocales()
    
public  Locale[]getSessionLocales()
    
public  Locale[]getUserLocales()
    
public static  booleanisLocaleAware()
    
public static  LocaleparseLocale(String localeString)
     Helper method to produce a java.util.Locale object from a locale string such as en_US or ja_JP.
public static  Locale[]parseLocales(String localeStringList)
     Helper method to produce a java.util.Locale array from a comma-delimited locale string list, e.g.
public  voidpersistUserLocales(Locale[] userLocales)
     Stores the user locales persistantly.
public  voidsetBrowserLocales(Locale[] browserLocales)
    
public static  voidsetJvmLocale(Locale jvmLocale)
    
public static  voidsetPortalLocales(Locale[] portalLocales)
    
public  voidsetSessionLocales(Locale[] sessionLocales)
    
public  voidsetUserLocales(Locale[] userLocales)
    
public static  StringstringValueOf(Locale[] locales)
     Constructs a comma-delimited list of locales that could be parsed back into a Locale array with parseLocales(String localeStringList).
public  StringtoString()
    
public static  DocumentxmlValueOf(Locale[] locales)
     Creates an XML representation of a list of locales.
public static  DocumentxmlValueOf(Locale[] locales, Locale selectedLocale)
     Creates an XML representation of a list of locales. If a selected locale is supplied, the XML element representing the selected locale will have an attribute of selected with value of true.

Field Detail
DEFAULT_LOCALE_AWARE
final public static boolean DEFAULT_LOCALE_AWARE(Code)
Default value for localeAware. This value will be used when the corresponding property cannot be loaded.




Constructor Detail
LocaleManager
public LocaleManager(IPerson person)(Code)
Constructor that associates a locale manager with a user.
Parameters:
  person - the user



LocaleManager
public LocaleManager(IPerson person, String acceptLanguage)(Code)
Constructor that sets up locales according to the Accept-Language request header from a user's browser.
Parameters:
  person - the user
Parameters:
  acceptLanguage - the Accept-Language request header from a user's browser




Method Detail
getBrowserLocales
public Locale[] getBrowserLocales()(Code)



getJvmLocale
public static Locale getJvmLocale()(Code)



getLocales
public Locale[] getLocales()(Code)
Produces a sorted list of locales according to locale preferences obtained from several places. The following priority is given: session, user, browser, portal, and jvm. the sorted list of locales



getPortalLocales
public static Locale[] getPortalLocales()(Code)



getSessionLocales
public Locale[] getSessionLocales()(Code)



getUserLocales
public Locale[] getUserLocales()(Code)



isLocaleAware
public static boolean isLocaleAware()(Code)



parseLocale
public static Locale parseLocale(String localeString)(Code)
Helper method to produce a java.util.Locale object from a locale string such as en_US or ja_JP.
Parameters:
  localeString - a locale string such as en_US a java.util.Locale object representing the locale string



parseLocales
public static Locale[] parseLocales(String localeStringList)(Code)
Helper method to produce a java.util.Locale array from a comma-delimited locale string list, e.g. "en_US,ja_JP"
Parameters:
  localeStringList - the locales to parse an array of locales representing the locale string list



persistUserLocales
public void persistUserLocales(Locale[] userLocales) throws Exception(Code)
Stores the user locales persistantly.
Parameters:
  userLocales - the user locales preference
throws:
  Exception -



setBrowserLocales
public void setBrowserLocales(Locale[] browserLocales)(Code)



setJvmLocale
public static void setJvmLocale(Locale jvmLocale)(Code)



setPortalLocales
public static void setPortalLocales(Locale[] portalLocales)(Code)



setSessionLocales
public void setSessionLocales(Locale[] sessionLocales)(Code)



setUserLocales
public void setUserLocales(Locale[] userLocales)(Code)



stringValueOf
public static String stringValueOf(Locale[] locales)(Code)
Constructs a comma-delimited list of locales that could be parsed back into a Locale array with parseLocales(String localeStringList).
Parameters:
  locales - the list of locales a string representing the list of locales



toString
public String toString()(Code)



xmlValueOf
public static Document xmlValueOf(Locale[] locales)(Code)
Creates an XML representation of a list of locales.
Parameters:
  locales - the locale list the locale list as XML



xmlValueOf
public static Document xmlValueOf(Locale[] locales, Locale selectedLocale)(Code)
Creates an XML representation of a list of locales. If a selected locale is supplied, the XML element representing the selected locale will have an attribute of selected with value of true. This is helpful when constructing user interfaces that indicate which locale is selected.
Parameters:
  locales - the locale list
Parameters:
  selectedLocale - a locale that should be selected if it is in the list the locale list as XML



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.