Class DefaultRSQLEvaluationService<P extends Product>

java.lang.Object
com.broadleafcommerce.catalog.service.rsql.DefaultRSQLEvaluationService<P>
All Implemented Interfaces:
RSQLEvaluationService<P>

public class DefaultRSQLEvaluationService<P extends Product> extends Object implements RSQLEvaluationService<P>
  • Constructor Details

    • DefaultRSQLEvaluationService

      public DefaultRSQLEvaluationService(com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLArgumentParser argumentParser)
  • Method Details

    • evaluateRSQLExpression

      public Boolean evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.Node node, P product)
      Description copied from interface: RSQLEvaluationService
      Evaluated the expression against a product based on a generic Node.
      Specified by:
      evaluateRSQLExpression in interface RSQLEvaluationService<P extends Product>
      Parameters:
      node - A generic node structure in a structured RSQL query
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise
    • evaluateRSQLExpression

      public Boolean evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.LogicalNode logicalNode, P product)
      Description copied from interface: RSQLEvaluationService
      Evaluated the expression against a product based on a logical Node. Logical nodes are 'and'/'or' combinations of comparison nodes.
      Specified by:
      evaluateRSQLExpression in interface RSQLEvaluationService<P extends Product>
      Parameters:
      logicalNode - A logical node structure in a structured RSQL query
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise
    • evaluateRSQLExpression

      public Boolean evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.ComparisonNode comparisonNode, P product)
      Description copied from interface: RSQLEvaluationService
      Evaluated the expression against a product based on a comparison Node. Comparison nodes filter values on a specific field.
      Specified by:
      evaluateRSQLExpression in interface RSQLEvaluationService<P extends Product>
      Parameters:
      comparisonNode - A comparison node structure in a structured RSQL query
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise
    • evaluateRSQLExpression

      public Boolean evaluateRSQLExpression(String selector, cz.jirutka.rsql.parser.ast.ComparisonOperator operator, List<String> arguments, P product)
      Description copied from interface: RSQLEvaluationService
      Evaluated the expression against a product based on a set of comparison parameters.
      Specified by:
      evaluateRSQLExpression in interface RSQLEvaluationService<P extends Product>
      Parameters:
      selector - The field on the product
      operator - The type of comparison (=,!=,lt,etc...)
      arguments - One or more values to check against the field
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise
    • handleNull

      protected Boolean handleNull(Object arg, Object property)
    • handleBetween

      protected Boolean handleBetween(List<Object> parsed, Object property)
    • handleLessThanOrEqual

      protected Boolean handleLessThanOrEqual(Object arg, Object property)
    • handleLessThan

      protected Boolean handleLessThan(Object arg, Object property)
    • handleGreaterThanOrEqual

      protected Boolean handleGreaterThanOrEqual(Object arg, Object property)
    • handleGreaterThan

      protected Boolean handleGreaterThan(Object arg, Object property)
    • handleEqual

      protected Boolean handleEqual(Object arg, boolean isString, boolean isRegex, Object property)
    • handleEqualIgnoreCase

      protected Boolean handleEqualIgnoreCase(Object arg, boolean isRegex, Object property)
    • handleIn

      protected Boolean handleIn(Collection<?> arg, Object property)
    • convertParsedRSQLToRegExpression

      protected String convertParsedRSQLToRegExpression(Object arg)