Class SpringWebQueryPropertiesAutoConfig

java.lang.Object
in.co.akshitbansal.springwebquery.config.SpringWebQueryPropertiesAutoConfig

@AutoConfiguration public class SpringWebQueryPropertiesAutoConfig extends Object
Publishes the validated global filtering configuration used by the starter's specification resolver auto-configuration.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    in.co.akshitbansal.springwebquery.SpringWebQueryProperties
    springWebQueryProperties(String globalFilterParamName, boolean globalAllowAndOperation, boolean globalAllowOrOperation, int globalMaxASTDepth, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator)
    Creates the shared immutable container for global filtering defaults contributed through application configuration.

    Methods inherited from class java.lang.Object

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

    • SpringWebQueryPropertiesAutoConfig

      public SpringWebQueryPropertiesAutoConfig()
  • Method Details

    • springWebQueryProperties

      @Bean @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.SpringWebQueryProperties springWebQueryProperties(@Value("${spring-web-query.filtering.filter-param-name:filter}") String globalFilterParamName, @Value("${spring-web-query.filtering.allow-and-operation:true}") boolean globalAllowAndOperation, @Value("${spring-web-query.filtering.allow-or-operation:false}") boolean globalAllowOrOperation, @Value("${spring-web-query.filtering.max-ast-depth:1}") int globalMaxASTDepth, in.co.akshitbansal.springwebquery.validator.QueryParamNameValidator queryParamNameValidator)
      Creates the shared immutable container for global filtering defaults contributed through application configuration.
      Parameters:
      globalFilterParamName - configured request parameter name for filter expressions
      globalAllowAndOperation - whether logical AND nodes are allowed by default
      globalAllowOrOperation - whether logical OR nodes are allowed by default
      globalMaxASTDepth - configured maximum allowed depth for parsed RSQL ASTs
      queryParamNameValidator - validator used for configured filter parameter names
      Returns:
      validated global filtering properties
      Throws:
      in.co.akshitbansal.springwebquery.exception.QueryConfigurationException - if the configured maximum AST depth is negative