public final class Filters extends Object
Filter
and
FilterCondition
s.Modifier and Type | Method and Description |
---|---|
static FilterCondition |
and(Collection<FilterCondition> conditions)
Returns a
FilterCondition which will only match requests which
match all the provided conditions. |
static FilterCondition |
and(FilterCondition... conditions)
Returns a
FilterCondition which will only match requests which
match all the provided conditions. |
static Filter |
conditionalFilter(FilterCondition condition,
Filter subFilter)
Returns a
Filter which will only invoke subFilter when
the provided filter condition matches the request being processed. |
static FilterCondition |
matchRequestType(RequestType... types)
Returns a
FilterCondition which will only match requests whose
type is contained in types . |
static FilterCondition |
matchRequestType(Set<RequestType> types)
Returns a
FilterCondition which will only match requests whose
type is contained in types . |
static FilterCondition |
matchResourcePath(Pattern regex)
Returns a
FilterCondition which will only match requests whose
resource path matches the provided regular expression. |
static FilterCondition |
matchResourcePath(String regex)
Returns a
FilterCondition which will only match requests whose
resource path matches the provided regular expression. |
static FilterCondition |
not(FilterCondition condition)
Returns a
FilterCondition which will match requests which do not
match the provided condition. |
static FilterCondition |
or(Collection<FilterCondition> conditions)
Returns a
FilterCondition which will match requests which match
any of the provided conditions. |
static FilterCondition |
or(FilterCondition... conditions)
Returns a
FilterCondition which will match requests which match
any of the provided conditions. |
public static FilterCondition and(Collection<FilterCondition> conditions)
FilterCondition
which will only match requests which
match all the provided conditions.conditions
- The conditions which requests must match.public static FilterCondition and(FilterCondition... conditions)
FilterCondition
which will only match requests which
match all the provided conditions.conditions
- The conditions which requests must match.public static Filter conditionalFilter(FilterCondition condition, Filter subFilter)
Filter
which will only invoke subFilter
when
the provided filter condition matches the request being processed.condition
- The filter condition.subFilter
- The sub-filter to be invoked when the condition matches.public static FilterCondition matchRequestType(RequestType... types)
FilterCondition
which will only match requests whose
type is contained in types
.types
- The request types which should be handled by the filter.Request.getRequestType()
public static FilterCondition matchRequestType(Set<RequestType> types)
FilterCondition
which will only match requests whose
type is contained in types
.types
- The request types which should be handled by the filter.Request.getRequestType()
public static FilterCondition matchResourcePath(Pattern regex)
FilterCondition
which will only match requests whose
resource path matches the provided regular expression.regex
- The regular expression which must match a request's resource
path.Request.getResourcePath()
public static FilterCondition matchResourcePath(String regex)
FilterCondition
which will only match requests whose
resource path matches the provided regular expression.regex
- The regular expression which must match a request's resource
path.Request.getResourcePath()
public static FilterCondition not(FilterCondition condition)
FilterCondition
which will match requests which do not
match the provided condition.condition
- The condition which requests must not match.public static FilterCondition or(Collection<FilterCondition> conditions)
FilterCondition
which will match requests which match
any of the provided conditions.conditions
- The conditions which requests may match.public static FilterCondition or(FilterCondition... conditions)
FilterCondition
which will match requests which match
any of the provided conditions.conditions
- The conditions which requests may match.Copyright © 2025 Open Identity Platform Community. All rights reserved.