atg.projects.store.servlet
Class StoreRequestLocale

java.lang.Object
  extended by atg.servlet.RequestLocale
      extended by atg.userprofiling.ProfileRequestLocale
          extended by atg.projects.store.servlet.StoreRequestLocale

public class StoreRequestLocale
extends atg.userprofiling.ProfileRequestLocale

The extensions to ootb RequestLocale.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String LANG_SELECTION_PARAMETER
           
static java.lang.String PROFILE_LOCALE_UNSET_VALUE
           
static java.lang.String STORE_CONFIGURATION_ATTRIBUTE_NAME
           
static java.lang.String STORE_ID_COOKIE_NAME
           
static java.lang.String USER_PREF_LANGUAGE_COOKIE_NAME
           
 
Constructor Summary
StoreRequestLocale()
           
 
Method Summary
protected  void createUserPrefLangCookie(atg.servlet.DynamoHttpServletRequest pRequest, java.lang.String pLanguage)
          This operation creates cookie for user preffered language.
 java.util.Locale discernRequestLocale(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.RequestLocale pReqLocal)
          Obtains locale from http request.
protected  java.util.Locale fillLocaleFromLangSelection(atg.servlet.DynamoHttpServletRequest pRequest)
           
protected  java.util.Locale fillLocaleFromProfile(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.RequestLocale pReqLocal)
           
protected  java.util.Locale fillLocaleFromStore(atg.servlet.DynamoHttpServletRequest pRequest)
           
protected  java.util.Locale fillLocaleFromStoreSelection(atg.servlet.DynamoHttpServletRequest pRequest)
           
protected  java.util.Locale fillLocaleFromUserPrefLang(atg.servlet.DynamoHttpServletRequest pRequest)
           
 InternationalizationStoreConfiguration getInternationalizationStoreConfiguration()
          Gets the internationalization StoreConfiguration.
 InternationalizationStoreConfigurationContainer getInternationalizationStoreConfigurationContainer()
          Gets the internationalization StoreConfigurationContainer.
 SessionBean getSessionBean()
          Gets the session bean property
 void setInternationalizationStoreConfiguration(InternationalizationStoreConfiguration pInternationalizationStoreConfiguration)
          Sets the InternationalizationStoreConfiguration.
 void setInternationalizationStoreConfigurationContainer(InternationalizationStoreConfigurationContainer pInternationalizationStoreConfigurationContainer)
          Registers the InternationalizationStoreConfigurationContainer.
 void setSessionBean(SessionBean pSessionBean)
          Sets session bean property
protected  void updateProfileLocale(atg.servlet.DynamoHttpServletRequest pRequest, java.util.Locale locale)
          Updates locale in profile.
 
Methods inherited from class atg.userprofiling.ProfileRequestLocale
getProfileAttributeName, getProfilePath, handleRefresh, localeFromProfileAttribute, setProfileAttributeName, setProfilePath
 
Methods inherited from class atg.servlet.RequestLocale
doStartService, fillInHTTPInfo, getAcceptCharset, getAcceptCharsetList, getAcceptLanguage, getAcceptLanguageList, getCachedLocale, getDefaultRequestLocale, getDefaultRequestLocaleName, getDetectHTTPHeaderChanges, getLocale, getLocaleString, getNewLocale, getOriginatingRequest, getOverrideRequestLocale, getOverrideRequestLocaleName, getPreviousLocale, getPreviousLocaleString, getValidLocaleNames, getValidLocales, initializeRequestLocale, localeFromHTTPHeader, setDefaultRequestLocaleName, setDetectHTTPHeaderChanges, setLocale, setLocaleString, setOriginatingRequest, setOverrideRequestLocaleName, setValidLocaleNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

USER_PREF_LANGUAGE_COOKIE_NAME

public static final java.lang.String USER_PREF_LANGUAGE_COOKIE_NAME
See Also:
Constant Field Values

STORE_ID_COOKIE_NAME

public static final java.lang.String STORE_ID_COOKIE_NAME
See Also:
Constant Field Values

LANG_SELECTION_PARAMETER

public static final java.lang.String LANG_SELECTION_PARAMETER
See Also:
Constant Field Values

STORE_CONFIGURATION_ATTRIBUTE_NAME

public static final java.lang.String STORE_CONFIGURATION_ATTRIBUTE_NAME
See Also:
Constant Field Values

PROFILE_LOCALE_UNSET_VALUE

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

StoreRequestLocale

public StoreRequestLocale()
Method Detail

getInternationalizationStoreConfigurationContainer

public InternationalizationStoreConfigurationContainer getInternationalizationStoreConfigurationContainer()
Gets the internationalization StoreConfigurationContainer.

Returns:
The InternationalizationStoreConfigurationContainer.
See Also:
atg.projects.store.storeconfig.InternationalizationStoreConfigurationContainer.

setInternationalizationStoreConfigurationContainer

public void setInternationalizationStoreConfigurationContainer(InternationalizationStoreConfigurationContainer pInternationalizationStoreConfigurationContainer)
Registers the InternationalizationStoreConfigurationContainer.

Parameters:
pInternationalizationStoreConfigurationContainer - the config container.

getInternationalizationStoreConfiguration

public InternationalizationStoreConfiguration getInternationalizationStoreConfiguration()
Gets the internationalization StoreConfiguration.

Returns:
The InternationalizationStoreConfiguration.

setInternationalizationStoreConfiguration

public void setInternationalizationStoreConfiguration(InternationalizationStoreConfiguration pInternationalizationStoreConfiguration)
Sets the InternationalizationStoreConfiguration.

Parameters:
pInternationalizationStoreConfiguration - store configuration.

getSessionBean

public SessionBean getSessionBean()
Gets the session bean property

Returns:
session bean

setSessionBean

public void setSessionBean(SessionBean pSessionBean)
Sets session bean property

Parameters:
pSessionBean - session bean

discernRequestLocale

public java.util.Locale discernRequestLocale(atg.servlet.DynamoHttpServletRequest pRequest,
                                             atg.servlet.RequestLocale pReqLocal)
Obtains locale from http request.

Overrides:
discernRequestLocale in class atg.userprofiling.ProfileRequestLocale
Parameters:
pRequest - DynamoHttpServletRequest
pReqLocal - Request locale
Returns:
Locale object

fillLocaleFromLangSelection

protected java.util.Locale fillLocaleFromLangSelection(atg.servlet.DynamoHttpServletRequest pRequest)
Parameters:
pRequest - DynamoHttpServletRequest object.
Returns:
Locale based on language selection.

fillLocaleFromStoreSelection

protected java.util.Locale fillLocaleFromStoreSelection(atg.servlet.DynamoHttpServletRequest pRequest)
Parameters:
pRequest - DynamoHttpServletRequest object.
Returns:
Locale based on store selection.

fillLocaleFromUserPrefLang

protected java.util.Locale fillLocaleFromUserPrefLang(atg.servlet.DynamoHttpServletRequest pRequest)
Parameters:
pRequest - DynamoHttpServletRequest object.
Returns:
Locale based on user preffered language.

fillLocaleFromProfile

protected java.util.Locale fillLocaleFromProfile(atg.servlet.DynamoHttpServletRequest pRequest,
                                                 atg.servlet.RequestLocale pReqLocal)
Parameters:
pRequest - DynamoHttpServletRequest object.
pReqLocal - RequestLocale object.
Returns:
Locale based on profile.

fillLocaleFromStore

protected java.util.Locale fillLocaleFromStore(atg.servlet.DynamoHttpServletRequest pRequest)
Parameters:
pRequest - DynamoHttpServletRequest object.
Returns:
Locale based on store.

createUserPrefLangCookie

protected void createUserPrefLangCookie(atg.servlet.DynamoHttpServletRequest pRequest,
                                        java.lang.String pLanguage)
This operation creates cookie for user preffered language.

Parameters:
pRequest - DynamoHttpServletRequest object.
pLanguage - User preferred language.

updateProfileLocale

protected void updateProfileLocale(atg.servlet.DynamoHttpServletRequest pRequest,
                                   java.util.Locale locale)
Updates locale in profile.

Parameters:
pRequest - DynamoHttpServletRequest object.
locale - Profile Locale.