com.ibm.commerce.contract.catalogfilter

Class AbstractCatalogFilterSearchExpressionCompositor

  • java.lang.Object
    • com.ibm.commerce.contract.catalogfilter.AbstractCatalogFilterSearchExpressionCompositor
  • Direct Known Subclasses:
    CatalogFilterDefaultSearchExpressionCompositor


    public abstract class AbstractCatalogFilterSearchExpressionCompositor
    extends java.lang.Object
    AbstractCatalogFilterSearchExpressionCompositor is a abstract class does the practical building work for ProductEntitlementExpressionHelper, the following procedures are what AbstractCatalogFilterSearchExpressionCompositor does internally:
    • Builds search expression for buyer contracts
    • Builds search expression for hosting contract
    • Composes the search expressions with buyer contracts and hosting contract
    The default relation between buyer contracts and hosting contract is "AND", it's consistent with Commerce E-Site store model that Hub store can restricts the catalog entitle permission of its affiliate E-Site store.

    To change the default relation between buyer contracts and hosting contract, isCompositeOperationAnd should be overwrite as "OR".

    See Also:
    CatalogFilterDefaultSearchExpressionCompositor
    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractCatalogFilterSearchExpressionCompositor(java.util.List<java.lang.Long> buyerContractIdList, java.lang.Long memberId)
      The AbstractCatalogFilterSearchExpressionCompositor constructor.
      AbstractCatalogFilterSearchExpressionCompositor(java.util.List<java.lang.Long> buyerContractIdList, java.lang.Long hostingContractId, java.lang.Long memberId)
      The AbstractCatalogFilterSearchExpressionCompositor constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getExpression()
      Get product entitlement search expression based on the CatalogFilter Term Conditions and ProductSet Term Conditions defined in the specified buyer contracts and hosting contract.
      java.lang.String getExpressionByContract(java.lang.Long contractId)
      Get product entitlement search expression based on the CatalogFilter Term Conditions and ProductSet Term Conditions defined contract.
      abstract boolean isCompositeOperationAnd()
      This abstract method is adopted to determine what operation should be used to combine the product entitlement search expression between multiple buyer contracts.
      • Methods inherited from class java.lang.Object

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

      • AbstractCatalogFilterSearchExpressionCompositor

        public AbstractCatalogFilterSearchExpressionCompositor(java.util.List<java.lang.Long> buyerContractIdList,
                                                               java.lang.Long hostingContractId,
                                                               java.lang.Long memberId)
        The AbstractCatalogFilterSearchExpressionCompositor constructor.
        Parameters:
        buyerContractIdList - Buyer contract ID list.
        hostingContractId - Hosting contract ID list.
        memberId - The memberId
      • AbstractCatalogFilterSearchExpressionCompositor

        public AbstractCatalogFilterSearchExpressionCompositor(java.util.List<java.lang.Long> buyerContractIdList,
                                                               java.lang.Long memberId)
        The AbstractCatalogFilterSearchExpressionCompositor constructor.
        Parameters:
        buyerContractIdList - Buyer contract ID list.
        memberId - The memberId
    • Method Detail

      • getExpression

        public java.lang.String getExpression()
                                       throws ECException
        Get product entitlement search expression based on the CatalogFilter Term Conditions and ProductSet Term Conditions defined in the specified buyer contracts and hosting contract.
        Returns:
        Product entitlement search expression.
        Throws:
        ECException - Exception could be thrown during the expression building procedure.
      • getExpressionByContract

        public java.lang.String getExpressionByContract(java.lang.Long contractId)
                                                 throws ECException
        Get product entitlement search expression based on the CatalogFilter Term Conditions and ProductSet Term Conditions defined contract.
        Parameters:
        contractId - the contract id.
        Returns:
        Product entitlement search expression.
        Throws:
        ECException - Exception could be thrown during the expression building procedure.
      • isCompositeOperationAnd

        public abstract boolean isCompositeOperationAnd()
        This abstract method is adopted to determine what operation should be used to combine the product entitlement search expression between multiple buyer contracts.
        Returns:
        True if the relationship between multiple buyer contracts is "AND" False if the relationship between multiple buyer contracts is "OR"