Class WebRequestMethodsRule

java.lang.Object
io.microsphere.spring.web.rule.AbstractWebRequestRule<String>
io.microsphere.spring.web.rule.WebRequestMethodsRule
All Implemented Interfaces:
WebRequestRule

public class WebRequestMethodsRule extends AbstractWebRequestRule<String>
WebRequest Methods WebRequestRule

A logical disjunction (' || ') request condition that matches a request against a set of RequestMethods.

Since:
1.0.0
Author:
Rossen Stoyanchev, Mercy
See Also:
  • org.springframework.web.servlet.mvc.condition.RequestMethodsRequestCondition
  • org.springframework.web.reactive.result.condition.RequestMethodsRequestCondition
  • Constructor Details

    • WebRequestMethodsRule

      public WebRequestMethodsRule(org.springframework.web.bind.annotation.RequestMethod... requestMethods)
    • WebRequestMethodsRule

      public WebRequestMethodsRule(String method, String... others)
  • Method Details

    • getContent

      protected Collection<String> getContent()
      Description copied from class: AbstractWebRequestRule
      Return the discrete items a request condition is composed of.

      For example URL patterns, HTTP request methods, param expressions, etc.

      Specified by:
      getContent in class AbstractWebRequestRule<String>
      Returns:
      a collection of objects (never null)
    • getToStringInfix

      protected String getToStringInfix()
      Description copied from class: AbstractWebRequestRule
      The notation to use when printing discrete items of content.

      For example " || " for URL patterns or " && " for param expressions.

      Specified by:
      getToStringInfix in class AbstractWebRequestRule<String>
    • matches

      public boolean matches(org.springframework.web.context.request.NativeWebRequest request)
    • matches

      public boolean matches(String method)