com.ibm.commerce.marketing.promotion

Interface Description

  • All Superinterfaces:
    java.io.Serializable, XMLizable
    All Known Implementing Classes:
    TypedNLDescription


    public interface Description
    extends XMLizable
    This is the interface for description. It has type and locale information and can be associated with objects such as promotion, promotion group and promotion policy.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ADMIN_DESC
      The value of the 'admin' type of description.
      static java.lang.String COPYRIGHT
      IBM Copyright
      static int MAXSIZE
      Maximum number of descriptions hold in each locale.
      static int SHOPPER_LONG_DESC
      The value of the 'long' type of description.
      static int SHOPPER_SHORT_DESC
      The value of the 'short' type of description.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void addDescription(java.util.Locale locale, int type, java.lang.String description)
      Adds a description with a type, locale and text.
      java.lang.String getDefaultDescription(int type)
      Returns the specified type of the description in the default locale.
      java.lang.String getDescription(java.util.Locale locale, int type)
      Returns the specified type of the description in a particular locale.
      void removeDescription(java.util.Locale locale, int type)
      Removes a description with a type and locale.
      void reset()
      Resets the description, removes all descriptions.
      void setDefaultLocale(java.util.Locale locale)
      Sets the default locale for this description object.
    • Field Detail

      • MAXSIZE

        static final int MAXSIZE
        Maximum number of descriptions hold in each locale.
        See Also:
        Constant Field Values
      • ADMIN_DESC

        static final int ADMIN_DESC
        The value of the 'admin' type of description.
        See Also:
        Constant Field Values
      • SHOPPER_LONG_DESC

        static final int SHOPPER_LONG_DESC
        The value of the 'long' type of description.
        See Also:
        Constant Field Values
      • SHOPPER_SHORT_DESC

        static final int SHOPPER_SHORT_DESC
        The value of the 'short' type of description.
        See Also:
        Constant Field Values
    • Method Detail

      • getDescription

        java.lang.String getDescription(java.util.Locale locale,
                                        int type)
        Returns the specified type of the description in a particular locale. The types of the description include the following:
        0: Administrative description
        1: Customer facing long description
        2: Customer facing short description
        Parameters:
        locale - The Locale of the description to be returned.
        type - The type of the description to be returned.
        Returns:
        String The specified type of the description in a locale.
      • getDefaultDescription

        java.lang.String getDefaultDescription(int type)
        Returns the specified type of the description in the default locale. The types of the description include the following:
        0: Administrative description
        1: Customer facing long description
        2: Customer facing short description
        Parameters:
        type - The type of the description.
        Returns:
        The specified type of the description in default locale.
      • addDescription

        void addDescription(java.util.Locale locale,
                            int type,
                            java.lang.String description)
        Adds a description with a type, locale and text. The types of the description include the following:
        0: Administrative description
        1: Customer facing long description
        2: Customer facing short description
        Parameters:
        locale - The locale for which the description is added.
        type - The type of the description.
        description - The text of the description.
      • removeDescription

        void removeDescription(java.util.Locale locale,
                               int type)
        Removes a description with a type and locale. The types of the description include the following:
        0: Administrative description
        1: Customer facing long description
        2: Customer facing short description
        Parameters:
        locale - The locale of the description to be removed.
        type - The type of the description to be removed.
      • reset

        void reset()
        Resets the description, removes all descriptions.
      • setDefaultLocale

        void setDefaultLocale(java.util.Locale locale)
        Sets the default locale for this description object.
        Parameters:
        locale - the default locale.