| Modifier and Type | Field and Description |
|---|---|
static Rule |
Rules.DEFAULT_ALLOW
A default ALLOW rule that matches everything.
|
static Rule |
Rules.DEFAULT_DENY
A default DENY rule that matches everything.
|
static Rule |
Rules.DEFAULT_EXCLUDE
A default EXCLUDE rule that matches everything.
|
static Rule |
Rules.DEFAULT_INCLUDE
A default INCLUDE rule that matches everything.
|
| Modifier and Type | Method and Description |
|---|---|
static Rule |
Rules.fromJson(javax.json.JsonObject ruleJson)
Construct a single rule from a JSON object with keys
type and pattern. |
static Rule |
Rules.fuzzyDefaultAllow(List<Rule> rules)
Return
Rules.DEFAULT_ALLOW, unless first element in rules list is an explicit allow, in which
case return Rules.DEFAULT_DENY. |
static Rule |
Rules.fuzzyDefaultDeny(List<Rule> rules)
Return
Rules.DEFAULT_DENY, unless first element in rules list is an explicit deny, in which
case return Rules.DEFAULT_ALLOW. |
static Rule |
Rules.fuzzyDefaultExclude(List<Rule> rules)
Return
Rules.DEFAULT_EXCLUDE, unless first element in rules list is an explicit exclude, in which
case return Rules.DEFAULT_INCLUDE. |
static Rule |
Rules.fuzzyDefaultInclude(List<Rule> rules)
Return
Rules.DEFAULT_INCLUDE, unless first element in rules list is an explicit include, in which
case return Rules.DEFAULT_EXCLUDE. |
static Rule |
Rules.lastMatch(List<Rule> rules,
String value)
Evaluate the provided list of rules against the String value, using
Rules.fuzzyDefaultInclude(List) to select
the default rule when none match. |
static Rule |
Rules.lastMatch(List<Rule> rules,
String value,
Function<List<Rule>,Rule> selectDefault)
Evaluate the provided list of rules against the String value using the provided selector function to select the
default rule when none match.
|
| Modifier and Type | Method and Description |
|---|---|
static List<Rule> |
Rules.fromJsonArray(javax.json.JsonArray rulesArray)
Conveniently creates a list of Rules from the conventional use case of a JSON array containing a list of rule
JSON objects to be evaluated in sequence.
|
| Modifier and Type | Method and Description |
|---|---|
static Rule |
Rules.fuzzyDefaultAllow(List<Rule> rules)
Return
Rules.DEFAULT_ALLOW, unless first element in rules list is an explicit allow, in which
case return Rules.DEFAULT_DENY. |
static Rule |
Rules.fuzzyDefaultDeny(List<Rule> rules)
Return
Rules.DEFAULT_DENY, unless first element in rules list is an explicit deny, in which
case return Rules.DEFAULT_ALLOW. |
static Rule |
Rules.fuzzyDefaultExclude(List<Rule> rules)
Return
Rules.DEFAULT_EXCLUDE, unless first element in rules list is an explicit exclude, in which
case return Rules.DEFAULT_INCLUDE. |
static Rule |
Rules.fuzzyDefaultInclude(List<Rule> rules)
Return
Rules.DEFAULT_INCLUDE, unless first element in rules list is an explicit include, in which
case return Rules.DEFAULT_EXCLUDE. |
static Rule |
Rules.lastMatch(List<Rule> rules,
String value)
Evaluate the provided list of rules against the String value, using
Rules.fuzzyDefaultInclude(List) to select
the default rule when none match. |
static Rule |
Rules.lastMatch(List<Rule> rules,
String value,
Function<List<Rule>,Rule> selectDefault)
Evaluate the provided list of rules against the String value using the provided selector function to select the
default rule when none match.
|
static Rule |
Rules.lastMatch(List<Rule> rules,
String value,
Function<List<Rule>,Rule> selectDefault)
Evaluate the provided list of rules against the String value using the provided selector function to select the
default rule when none match.
|
static Rule |
Rules.lastMatch(List<Rule> rules,
String value,
Function<List<Rule>,Rule> selectDefault)
Evaluate the provided list of rules against the String value using the provided selector function to select the
default rule when none match.
|
Copyright © 2017–2020. All rights reserved.