Examples of HeadersRequestCondition


Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

    return new RequestMappingInfo(
        new PatternsRequestCondition(annotation.value(), getUrlPathHelper(), getPathMatcher(),
            this.useSuffixPatternMatch, this.useTrailingSlashMatch, this.fileExtensions),
        new RequestMethodsRequestCondition(annotation.method()),
        new ParamsRequestCondition(annotation.params()),
        new HeadersRequestCondition(annotation.headers()),
        new ConsumesRequestCondition(annotation.consumes(), annotation.headers()),
        new ProducesRequestCondition(annotation.produces(), annotation.headers(), getContentNegotiationManager()),
        customCondition);
  }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

    return new RequestMappingInfo(
        new PatternsRequestCondition(annotation.value(),
            getUrlPathHelper(), getPathMatcher(), this.useSuffixPatternMatch, this.useTrailingSlashMatch),
        new RequestMethodsRequestCondition(annotation.method()),
        new ParamsRequestCondition(annotation.params()),
        new HeadersRequestCondition(annotation.headers()),
        new ConsumesRequestCondition(annotation.consumes(), annotation.headers()),
        new ProducesRequestCondition(annotation.produces(), annotation.headers()),
        customCondition);
  }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

                ProducesRequestCondition produces,
                RequestCondition<?> custom) {
    this.patternsCondition = patterns != null ? patterns : new PatternsRequestCondition();
    this.methodsCondition = methods != null ? methods : new RequestMethodsRequestCondition();
    this.paramsCondition = params != null ? params : new ParamsRequestCondition();
    this.headersCondition = headers != null ? headers : new HeadersRequestCondition();
    this.consumesCondition = consumes != null ? consumes : new ConsumesRequestCondition();
    this.producesCondition = produces != null ? produces : new ProducesRequestCondition();
    this.customConditionHolder = new RequestConditionHolder(custom);
  }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

   */
  public RequestMappingInfo combine(RequestMappingInfo other) {
    PatternsRequestCondition patterns = this.patternsCondition.combine(other.patternsCondition);
    RequestMethodsRequestCondition methods = this.methodsCondition.combine(other.methodsCondition);
    ParamsRequestCondition params = this.paramsCondition.combine(other.paramsCondition);
    HeadersRequestCondition headers = this.headersCondition.combine(other.headersCondition);
    ConsumesRequestCondition consumes = this.consumesCondition.combine(other.consumesCondition);
    ProducesRequestCondition produces = this.producesCondition.combine(other.producesCondition);
    RequestConditionHolder custom = this.customConditionHolder.combine(other.customConditionHolder);

    return new RequestMappingInfo(patterns, methods, params, headers, consumes, produces, custom.getCondition());
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

   * @return a new instance in case all conditions match; or {@code null} otherwise
   */
  public RequestMappingInfo getMatchingCondition(HttpServletRequest request) {
    RequestMethodsRequestCondition methods = methodsCondition.getMatchingCondition(request);
    ParamsRequestCondition params = paramsCondition.getMatchingCondition(request);
    HeadersRequestCondition headers = headersCondition.getMatchingCondition(request);
    ConsumesRequestCondition consumes = consumesCondition.getMatchingCondition(request);
    ProducesRequestCondition produces = producesCondition.getMatchingCondition(request);
   
    if (methods == null || params == null || headers == null || consumes == null || produces == null) {
      return null;
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

        annotation.name(),
        new PatternsRequestCondition(patterns, getUrlPathHelper(), getPathMatcher(),
            this.useSuffixPatternMatch, this.useTrailingSlashMatch, this.fileExtensions),
        new RequestMethodsRequestCondition(annotation.method()),
        new ParamsRequestCondition(annotation.params()),
        new HeadersRequestCondition(annotation.headers()),
        new ConsumesRequestCondition(annotation.consumes(), annotation.headers()),
        new ProducesRequestCondition(annotation.produces(), annotation.headers(), this.contentNegotiationManager),
        customCondition);
  }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

    this.name = (StringUtils.hasText(name) ? name : null);
    this.patternsCondition = (patterns != null ? patterns : new PatternsRequestCondition());
    this.methodsCondition = (methods != null ? methods : new RequestMethodsRequestCondition());
    this.paramsCondition = (params != null ? params : new ParamsRequestCondition());
    this.headersCondition = (headers != null ? headers : new HeadersRequestCondition());
    this.consumesCondition = (consumes != null ? consumes : new ConsumesRequestCondition());
    this.producesCondition = (produces != null ? produces : new ProducesRequestCondition());
    this.customConditionHolder = new RequestConditionHolder(custom);
  }
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

  public RequestMappingInfo combine(RequestMappingInfo other) {
    String name = combineNames(other);
    PatternsRequestCondition patterns = this.patternsCondition.combine(other.patternsCondition);
    RequestMethodsRequestCondition methods = this.methodsCondition.combine(other.methodsCondition);
    ParamsRequestCondition params = this.paramsCondition.combine(other.paramsCondition);
    HeadersRequestCondition headers = this.headersCondition.combine(other.headersCondition);
    ConsumesRequestCondition consumes = this.consumesCondition.combine(other.consumesCondition);
    ProducesRequestCondition produces = this.producesCondition.combine(other.producesCondition);
    RequestConditionHolder custom = this.customConditionHolder.combine(other.customConditionHolder);

    return new RequestMappingInfo(name, patterns,
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

   */
  @Override
  public RequestMappingInfo getMatchingCondition(HttpServletRequest request) {
    RequestMethodsRequestCondition methods = this.methodsCondition.getMatchingCondition(request);
    ParamsRequestCondition params = this.paramsCondition.getMatchingCondition(request);
    HeadersRequestCondition headers = this.headersCondition.getMatchingCondition(request);
    ConsumesRequestCondition consumes = this.consumesCondition.getMatchingCondition(request);
    ProducesRequestCondition produces = this.producesCondition.getMatchingCondition(request);

    if (methods == null || params == null || headers == null || consumes == null || produces == null) {
      return null;
View Full Code Here

Examples of org.springframework.web.servlet.mvc.condition.HeadersRequestCondition

      if (annotation != null) {
        return new RequestMappingInfo(
          new PatternsRequestCondition(annotation.value(), getUrlPathHelper(), getPathMatcher(), true, true),
          new RequestMethodsRequestCondition(annotation.method()),
          new ParamsRequestCondition(annotation.params()),
          new HeadersRequestCondition(annotation.headers()),
          new ConsumesRequestCondition(annotation.consumes(), annotation.headers()),
          new ProducesRequestCondition(annotation.produces(), annotation.headers()), null);
      }
      else {
        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.