com.ibm.commerce.contract.catalogfilter.util

Class ProductEntitlementExpressionHelper

  • java.lang.Object
    • com.ibm.commerce.contract.catalogfilter.util.ProductEntitlementExpressionHelper


  • public class ProductEntitlementExpressionHelper
    extends java.lang.Object
    ProductEntitlementExpressionHelper is used to build search engine specific query expression for contracts that contains CatalogFilter Term Conditions and ProductSet Term Conditions.

    ProductEntitlementExpressionHelper expose the API to external components, other components can instantiate it directly with passing a contract list as the input or not, if contract list passed, ProductEntitlementExpressionHelper will build the search expression against those contracts instead of fetch contract from context, if there is no contract passed as parameter, ProductEntitlementExpressionHelper will fetch the current eligible contracts and build search expression against them.

    • Constructor Detail

      • ProductEntitlementExpressionHelper

        public ProductEntitlementExpressionHelper()
                                           throws ECException
        The constructor with no arguments input.
        Throws:
        ECException - E-commerce exception could be thrown if any system runtime error occurred.
      • ProductEntitlementExpressionHelper

        public ProductEntitlementExpressionHelper(java.lang.Long memberId,
                                                  boolean isAdminMode)
                                           throws ECException
        The constructor.
        Parameters:
        memberId - The member Id.
        isAdminMode - Whether run instance in admin mode.
        Throws:
        ECException - E-commerce exception could be thrown if any system runtime error occurred.
      • ProductEntitlementExpressionHelper

        public ProductEntitlementExpressionHelper(TradingAgreementAccessBean[] tradingAgreements,
                                                  java.lang.Long memberId,
                                                  boolean isAdminMode)
                                           throws ECException
        The constructor
        Parameters:
        tradingAgreements - The determined trading agreement access bean array the expression build on.
        memberId - The member Id.
        isAdminMode - Whether run instance in admin mode.
        Throws:
        ECException - E-commerce exception could be thrown if any system runtime error occurred.
      • ProductEntitlementExpressionHelper

        public ProductEntitlementExpressionHelper(java.lang.Long[] contractIds,
                                                  java.lang.Long memberId,
                                                  boolean isAdminMode)
                                           throws ECException
        The constructor
        Parameters:
        contractIds - the contract id list the expression build on.
        memberId - The member Id.
        isAdminMode - Whether run instance in admin mode.
        Throws:
        ECException - E-commerce exception could be thrown if any system runtime error occurred.
    • Method Detail

      • getSearchExpression

        public java.lang.String getSearchExpression()
                                             throws ECException
        Get search expression.
        Returns:
        The search expression.
        Throws:
        ECException - E-commerce exception could be thrown if any system runtime error occurred.