com.plumtree.portaluiinfrastructure.login
Class PTLocaleMap

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.login.PTLocaleMap

public class PTLocaleMap
extends java.lang.Object

PTLocaleMap is used to facilitate custom mapping of one locale to another locale by user. This mappings can be set in LocaleMap.xml in i18n directory of WCI installation. When user specifies a custom mapping from a particular locale to a different locale. This class stores that mapping and it can be used by WCI to get the mapped locale to be set for the user.

Author:
Ravi Tunuguntla

Method Summary
static PTLocaleMap GetInstance()
          This static method returns singleton instance of PTLocaleMap.
 java.lang.String GetMappedLocale(java.lang.String locale)
          This method takes input a locale string and returns mapped locale for the input locale.
 boolean IsLocaleMapped(java.lang.String locale)
          This method takes input a locale and returns true if that locale has mapping, if not or if there is no LocaleMapping.xml file in WCI i18n directory then it returns false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

GetInstance

public static PTLocaleMap GetInstance()
This static method returns singleton instance of PTLocaleMap.

Returns:
Singleton instance of PTLocaleMap.

GetMappedLocale

public java.lang.String GetMappedLocale(java.lang.String locale)
This method takes input a locale string and returns mapped locale for the input locale. IsLocaleMapped method should be used before using this method to check if a mapping exists, only if a mapping exists this method can be used to retrieve the mapping

Parameters:
locale - from locale for which there is a mapping
Returns:
locale mapped locale for a given from locale.

IsLocaleMapped

public boolean IsLocaleMapped(java.lang.String locale)
This method takes input a locale and returns true if that locale has mapping, if not or if there is no LocaleMapping.xml file in WCI i18n directory then it returns false

Parameters:
locale - from locale for which there is a mapping
Returns:
true if there is a mapping, else false.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.