Class SpecificationArgumentResolverAutoConfig

java.lang.Object
in.co.akshitbansal.springwebquery.config.specification.SpecificationArgumentResolverAutoConfig

@AutoConfiguration public class SpecificationArgumentResolverAutoConfig extends Object
Creates specification resolvers using the starter's global filtering configuration.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpecificationArgumentResolverAutoConfig(String GLOBAL_FILTER_PARAM_NAME, boolean GLOBAL_ALLOW_OR_OPERATION, boolean GLOBAL_ALLOW_AND_OPERATION, int GLOBAL_MAX_AST_DEPTH, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator)
    Creates the auto-configuration and validates the global filtering properties contributed through application configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    in.co.akshitbansal.springwebquery.resolver.spring.WebQueryDTOAwareSpecificationArgumentResolver
    dtoAwareSpecArgumentResolver(cz.jirutka.rsql.parser.RSQLParser rsqlParser, List<io.github.perplexhub.rsql.RSQLCustomPredicate<?>> customPredicates, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator, in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory validationRSQLVisitorFactory)
    Creates the DTO-aware specification resolver used when @WebQuery exposes a DTO query contract.
    in.co.akshitbansal.springwebquery.resolver.spring.WebQueryEntityAwareSpecificationArgumentResolver
    entityAwareSpecArgumentResolver(cz.jirutka.rsql.parser.RSQLParser rsqlParser, List<io.github.perplexhub.rsql.RSQLCustomPredicate<?>> customPredicates, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator, in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory validationRSQLVisitorFactory, in.co.akshitbansal.springwebquery.validator.FieldMappingsValidator fieldMappingsValidator)
    Creates the entity-aware specification resolver used when @WebQuery resolves selectors directly against entity fields and aliases.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpecificationArgumentResolverAutoConfig

      public SpecificationArgumentResolverAutoConfig(@Value("${spring-web-query.filtering.filter-param-name:filter}") String GLOBAL_FILTER_PARAM_NAME, @Value("${spring-web-query.filtering.allow-or-operation:false}") boolean GLOBAL_ALLOW_OR_OPERATION, @Value("${spring-web-query.filtering.allow-and-operation:true}") boolean GLOBAL_ALLOW_AND_OPERATION, @Value("${spring-web-query.filtering.max-ast-depth:1}") int GLOBAL_MAX_AST_DEPTH, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator)
      Creates the auto-configuration and validates the global filtering properties contributed through application configuration.
      Parameters:
      GLOBAL_FILTER_PARAM_NAME - global default request parameter for RSQL filters
      GLOBAL_ALLOW_OR_OPERATION - whether logical OR is allowed by default
      GLOBAL_ALLOW_AND_OPERATION - whether logical AND is allowed by default
      GLOBAL_MAX_AST_DEPTH - maximum AST depth allowed by default
      queryParamNameValidator - validator used for the configured filter parameter name
  • Method Details

    • entityAwareSpecArgumentResolver

      @Bean @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.resolver.spring.WebQueryEntityAwareSpecificationArgumentResolver entityAwareSpecArgumentResolver(cz.jirutka.rsql.parser.RSQLParser rsqlParser, List<io.github.perplexhub.rsql.RSQLCustomPredicate<?>> customPredicates, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator, in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory validationRSQLVisitorFactory, in.co.akshitbansal.springwebquery.validator.FieldMappingsValidator fieldMappingsValidator)
      Creates the entity-aware specification resolver used when @WebQuery resolves selectors directly against entity fields and aliases.
      Parameters:
      rsqlParser - shared RSQL parser
      customPredicates - shared custom predicate adapters
      queryParamNameValidator - validator for request parameter name overrides
      validationRSQLVisitorFactory - factory for entity-aware validation visitors
      fieldMappingsValidator - validator for declared field aliases
      Returns:
      entity-aware specification resolver
    • dtoAwareSpecArgumentResolver

      @Bean @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.resolver.spring.WebQueryDTOAwareSpecificationArgumentResolver dtoAwareSpecArgumentResolver(cz.jirutka.rsql.parser.RSQLParser rsqlParser, List<io.github.perplexhub.rsql.RSQLCustomPredicate<?>> customPredicates, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator, in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory validationRSQLVisitorFactory)
      Creates the DTO-aware specification resolver used when @WebQuery exposes a DTO query contract.
      Parameters:
      rsqlParser - shared RSQL parser
      customPredicates - shared custom predicate adapters
      queryParamNameValidator - validator for request parameter name overrides
      validationRSQLVisitorFactory - factory for DTO-aware validation visitors
      Returns:
      DTO-aware specification resolver