Class RequestMatcher.MatchResult
- java.lang.Object
-
- org.springframework.security.web.util.matcher.RequestMatcher.MatchResult
-
- Enclosing interface:
- RequestMatcher
public static class RequestMatcher.MatchResult extends java.lang.Object
The result of matching against an HttpServletRequest Contains the status, true or false, of the match and if present, any variables extracted from the match- Since:
- 5.2
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getVariables()
Returns the extracted variable values where the key is the variable name and the value is the variable valueboolean
isMatch()
static RequestMatcher.MatchResult
match()
Creates an instance ofRequestMatcher.MatchResult
that is a match with no variablesstatic RequestMatcher.MatchResult
match(java.util.Map<java.lang.String,java.lang.String> variables)
Creates an instance ofRequestMatcher.MatchResult
that is a match with the specified variablesstatic RequestMatcher.MatchResult
notMatch()
Creates an instance ofRequestMatcher.MatchResult
that is not a match.
-
-
-
Method Detail
-
isMatch
public boolean isMatch()
- Returns:
- true if the comparison against the HttpServletRequest produced a successful match
-
getVariables
public java.util.Map<java.lang.String,java.lang.String> getVariables()
Returns the extracted variable values where the key is the variable name and the value is the variable value- Returns:
- a map containing key-value pairs representing extracted variable names and variable values
-
match
public static RequestMatcher.MatchResult match()
Creates an instance ofRequestMatcher.MatchResult
that is a match with no variables- Returns:
-
match
public static RequestMatcher.MatchResult match(java.util.Map<java.lang.String,java.lang.String> variables)
Creates an instance ofRequestMatcher.MatchResult
that is a match with the specified variables- Parameters:
variables
-- Returns:
-
notMatch
public static RequestMatcher.MatchResult notMatch()
Creates an instance ofRequestMatcher.MatchResult
that is not a match.- Returns:
-
-