com.plumtree.portaluiinfrastructure.application.varpacks
Class PTSearchLocaleVarPack

java.lang.Object
  extended by com.plumtree.uiinfrastructure.web.BaseVarPack
      extended by com.plumtree.portaluiinfrastructure.application.varpacks.PTSearchLocaleVarPack
All Implemented Interfaces:
IVarPack

public class PTSearchLocaleVarPack
extends BaseVarPack

This VarPack contains the localized names for all the installed locales

Author:
Stephen Chang

Field Summary
static java.lang.String PORTAL_SEARCHLOCALES_COMPONENT_TYPE
           
static java.lang.String VARPACK_ID
          The string ID of this variable package.
 
Constructor Summary
PTSearchLocaleVarPack()
           
 
Method Summary
protected  void ExpireContent()
          You cannot expire the SearchLocales.xml content.
 java.lang.String[] GetAllLanguageCodes()
          This method will return the All the Language Codes for a particular locale
 java.lang.String[] GetAllLanguageNames(java.lang.String strLocale)
          This method will return the All the Localized Language names for a particular locale
 java.lang.String GetLanguageNameForCode(java.lang.String strCode, java.lang.String strLanguage)
          This method will return the localized language name given its code.
 java.lang.String[] GetPopularLanguageCodes()
          This method will return the Popular Localized Language Codes for a particular locale
 java.lang.String[] GetPopularLanguageNames(java.lang.String strLocale)
          This method will return the Popular Localized Language names for a particular locale
protected  java.lang.Object GetValue(java.lang.String strLocale)
          This method will return the Localized Language Codes for a particular locale
 java.lang.String GetVarPackID()
          Get the id of this var pack instance.
 IXPEnumerator GetVarPackKeys()
          This method will return an enumeration of the top level nodes in the XML tree that is SearchLocales.xml.
 boolean IsPopularLanguage(java.lang.String strLocaleCode)
          This method check whether this language appears in the popular list
 boolean IsValidLanguage(java.lang.String strLocaleCode)
          This method check whether this language appears in the ALL list
protected  void Load()
          This method loads the SearchLocales.xml file into memory.
protected  void Reload()
          This method reloads the SearchLocales.xml file into memory.
 
Methods inherited from class com.plumtree.uiinfrastructure.web.BaseVarPack
CanReloadVarPackFromUI, ExpireVarPackContent, GetConfigPath, GetExpireTimeout, GetLastAccessedTimeStamp, GetReloadInterval, GetVarPackValue, IsLoaded, LoadVarPack, ReloadVarPack, SetExpireTimeout, SetReloadInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VARPACK_ID

public static final java.lang.String VARPACK_ID
The string ID of this variable package.

See Also:
Constant Field Values

PORTAL_SEARCHLOCALES_COMPONENT_TYPE

public static final java.lang.String PORTAL_SEARCHLOCALES_COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

PTSearchLocaleVarPack

public PTSearchLocaleVarPack()
Method Detail

GetAllLanguageCodes

public java.lang.String[] GetAllLanguageCodes()
This method will return the All the Language Codes for a particular locale


GetAllLanguageNames

public java.lang.String[] GetAllLanguageNames(java.lang.String strLocale)
This method will return the All the Localized Language names for a particular locale


GetLanguageNameForCode

public java.lang.String GetLanguageNameForCode(java.lang.String strCode,
                                               java.lang.String strLanguage)
This method will return the localized language name given its code.


GetPopularLanguageCodes

public java.lang.String[] GetPopularLanguageCodes()
This method will return the Popular Localized Language Codes for a particular locale


GetPopularLanguageNames

public java.lang.String[] GetPopularLanguageNames(java.lang.String strLocale)
This method will return the Popular Localized Language names for a particular locale


GetVarPackID

public java.lang.String GetVarPackID()
Description copied from class: BaseVarPack
Get the id of this var pack instance. Note: VarPackManager only has 1 key per var pack. This should be unquie per class instance.

Specified by:
GetVarPackID in interface IVarPack
Specified by:
GetVarPackID in class BaseVarPack
Returns:
A unique key to store the var pack in the varpackmanager.
See Also:
IVarPack.GetVarPackID()

GetVarPackKeys

public IXPEnumerator GetVarPackKeys()
This method will return an enumeration of the top level nodes in the XML tree that is SearchLocales.xml.

Specified by:
GetVarPackKeys in interface IVarPack
Specified by:
GetVarPackKeys in class BaseVarPack
Returns:
IXPEnumerator of keys in the var pack.
See Also:
IVarPack.GetVarPackKeys()

IsPopularLanguage

public boolean IsPopularLanguage(java.lang.String strLocaleCode)
This method check whether this language appears in the popular list


IsValidLanguage

public boolean IsValidLanguage(java.lang.String strLocaleCode)
This method check whether this language appears in the ALL list


ExpireContent

protected void ExpireContent()
You cannot expire the SearchLocales.xml content. You can only reload it. This method does nothing.

Specified by:
ExpireContent in class BaseVarPack
See Also:
com.plumtree.xpsupport.web.BaseVarPack#ExpireContent()

GetValue

protected java.lang.Object GetValue(java.lang.String strLocale)
This method will return the Localized Language Codes for a particular locale

Specified by:
GetValue in class BaseVarPack
Parameters:
strLocale - The key for the lookup
Returns:
the value from the lookup (null if not found)
See Also:
com.plumtree.xpsupport.web.BaseVarPack#GetValue(String)

Load

protected void Load()
This method loads the SearchLocales.xml file into memory.

Specified by:
Load in class BaseVarPack
See Also:
com.plumtree.xpsupport.web.BaseVarPack#Load()

Reload

protected void Reload()
This method reloads the SearchLocales.xml file into memory. It clears the current data and then delegates to Load().

Specified by:
Reload in class BaseVarPack
See Also:
com.plumtree.xpsupport.web.BaseVarPack#Reload()



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