com.ibm.commerce.couponredemption.commands

Class CouponUtilities

  • java.lang.Object
    • com.ibm.commerce.couponredemption.commands.CouponUtilities

  • Deprecated. 
    The WC54 coupon feature will be replaced by the WC56 promotion engine coupon feature.

    public class CouponUtilities
    extends java.lang.Object
    A utility class with common functions called repeatedly from different classes. It uses the following access beans: CatalogEntryRelationAccessBean StoreAccessBean OrderItemAccessBean CatalogGroupRelationAccessBean CatalogGroupCatalogEntryRelationAccessBean
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      Deprecated. 
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CouponUtilities()
      Deprecated. 
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      static int belongsToItemOrProduct(java.lang.Long catalogProductId, java.lang.Long catalogEntryId)
      Deprecated. 
      This method checkes whether the given catalog entry is the same as or belongs to the given product or catalog entry.
      static java.math.BigDecimal calculateTotalOrderAmt(java.util.Vector vecoiAB, StoreAccessBean sAB, CurrencyManager cm, java.lang.String curCurrency)
      Deprecated. 
      This method calculates the total order amount.
      static int catEntBelongsToCatGrp(java.lang.Long catalogEntryId, java.lang.Long catalogGroupId, java.lang.Long catalogId)
      Deprecated. 
      This method checkes whether the given catalog entry belongs to the given catalog group in a given catalog.
      static int groupBelongsTo(java.lang.String catalogId, java.lang.String parentGroupId, java.lang.String childGroupId)
      Deprecated. 
      This method checkes whether a given catalog group belongs to another given catalog group in a given catalog.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        Deprecated. 
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CouponUtilities

        public CouponUtilities()
        Deprecated. 
    • Method Detail

      • belongsToItemOrProduct

        public static int belongsToItemOrProduct(java.lang.Long catalogProductId,
                                                 java.lang.Long catalogEntryId)
        Deprecated. 
        This method checkes whether the given catalog entry is the same as or belongs to the given product or catalog entry.
        Parameters:
        catalogProductId - the target parent product or catalog entry
        catalogEntryId - the target child catalog entry
        Returns:
        1 if the relationship exists, -1 otherwise.
      • calculateTotalOrderAmt

        public static java.math.BigDecimal calculateTotalOrderAmt(java.util.Vector vecoiAB,
                                                                  StoreAccessBean sAB,
                                                                  CurrencyManager cm,
                                                                  java.lang.String curCurrency)
                                                           throws ECSystemException
        Deprecated. 
        This method calculates the total order amount.
        Parameters:
        vecoiAB - the orderitems
        sAB - access bean for the store
        cm - the currency manager to be used
        curCurrency - the currency to compute the total order amount in
        Returns:
        the total order amount
        Throws:
        ECSystemException
      • catEntBelongsToCatGrp

        public static int catEntBelongsToCatGrp(java.lang.Long catalogEntryId,
                                                java.lang.Long catalogGroupId,
                                                java.lang.Long catalogId)
        Deprecated. 
        This method checkes whether the given catalog entry belongs to the given catalog group in a given catalog.
        Parameters:
        catalogEntryId - the target child catalog entry
        catalogGroupId - the target parent catalog group
        catalogId - the catalog ID
        Returns:
        the depth (1 + the number of intermediate category nodes) in the catalog tree if the relationship exists, -1 otherwise.
      • groupBelongsTo

        public static int groupBelongsTo(java.lang.String catalogId,
                                         java.lang.String parentGroupId,
                                         java.lang.String childGroupId)
        Deprecated. 
        This method checkes whether a given catalog group belongs to another given catalog group in a given catalog.
        Parameters:
        catalogId - the catalog ID
        parentGroupId - the target parent catalog group
        childGroupId - the target child catalog group
        Returns:
        the depth (1 + the number of intermediate category nodes) in the catalog tree if the relationship exists, -1 otherwise.