com.ibm.commerce.context.globalization

Interface GlobalizationContext

  • All Superinterfaces:
    Context, java.io.Serializable


    public interface GlobalizationContext
    extends Context
    Defines the language, currency and locale being used in an activity. It also defines the preferred language and preferred currency of the user associated with this activity. If the runAsUser is modified in the BaseContext, the preferred language and preferred currency will be changed accordingly. Business logic can retrieve the above attributes via the use of Globalization Context.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CONTEXT_NAME
      The name that will identify this context in the CTXDATA table.
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String CURRENCY
      The name of the currency URL parameter in ActivityData objects.
      static java.lang.String KEY_LANG_ID
      The name of the langID URL parameter in ActivityData objects.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.String getCurrency()
      Gets the currency to be used when this context is active.
      java.lang.Integer getLanguageId()
      Gets the language to be used when this context is active.
      java.util.Locale getLocale()
      Gets the locale to be used when this context is active.
      java.lang.String getPreferredCurrency()
      Gets the preferred currency of the user associated with this context.
      java.lang.Integer getPreferredLanguageId()
      Gets the preferred language of the user associated with this context.
      void setCurrency(java.lang.String strCurrency)
      Gets the currency to be used when this context is active.
      void setLanguageId(java.lang.Integer nLanguageId)
      Sets the language to be used when this context is active.
      void setLocale(java.util.Locale locale)
      Sets the locale to be used when this context is active.
      void setPreferredCurrency(java.lang.String strCurrency)
      Sets the preferred currency of the user associated with this context.
      void setPreferredLanguageId(java.lang.Integer nLanguageId)
      Sets the preferred language of the user associated with this context.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CONTEXT_NAME

        static final java.lang.String CONTEXT_NAME
        The name that will identify this context in the CTXDATA table.
        See Also:
        Constant Field Values
      • KEY_LANG_ID

        static final java.lang.String KEY_LANG_ID
        The name of the langID URL parameter in ActivityData objects.
        See Also:
        Constant Field Values
      • CURRENCY

        static final java.lang.String CURRENCY
        The name of the currency URL parameter in ActivityData objects.
        See Also:
        Constant Field Values
    • Method Detail

      • getLanguageId

        java.lang.Integer getLanguageId()
        Gets the language to be used when this context is active.
        Returns:
        the language ID
      • getCurrency

        java.lang.String getCurrency()
        Gets the currency to be used when this context is active.
        Returns:
        the currency ID
      • getLocale

        java.util.Locale getLocale()
        Gets the locale to be used when this context is active.
        Returns:
        the locale
      • getPreferredLanguageId

        java.lang.Integer getPreferredLanguageId()
        Gets the preferred language of the user associated with this context.
        Returns:
        the language ID
      • getPreferredCurrency

        java.lang.String getPreferredCurrency()
        Gets the preferred currency of the user associated with this context.
        Returns:
        the currency ID
      • setLanguageId

        void setLanguageId(java.lang.Integer nLanguageId)
        Sets the language to be used when this context is active.
        Parameters:
        nLanguageId - the language ID
      • setCurrency

        void setCurrency(java.lang.String strCurrency)
        Gets the currency to be used when this context is active.
        Parameters:
        strCurrency - the currency ID
      • setLocale

        void setLocale(java.util.Locale locale)
        Sets the locale to be used when this context is active.
        Parameters:
        locale - the locale
      • setPreferredLanguageId

        void setPreferredLanguageId(java.lang.Integer nLanguageId)
        Sets the preferred language of the user associated with this context.
        Parameters:
        nLanguageId - the language ID
      • setPreferredCurrency

        void setPreferredCurrency(java.lang.String strCurrency)
        Sets the preferred currency of the user associated with this context.
        Parameters:
        strCurrency - the currency ID