Class WebQueryDecodePlugin.Builder
java.lang.Object
com.peterphi.std.guice.restclient.jaxb.webquery.plugin.WebQueryDecodePlugin.Builder
- Enclosing interface:
- WebQueryDecodePlugin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAllow only the provided set of keys, and special keys.allowOnlyStrict
(String... keys) Allow only the provided set of keys.Indicates that the provided set of keys may not be specified by the user.Indicates that WebQuery Text queries should be bannedbuild()
Add a validator to limit the values that may be provided by the user for a given keywith
(WebQueryDecodePlugin plugin)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
with
-
validate
Add a validator to limit the values that may be provided by the user for a given key- Parameters:
key
- the key to validatepredicate
- condition which must return true for all values for this key- Returns:
- this builder instance for chaining
-
banTextQuery
Indicates that WebQuery Text queries should be banned- Returns:
- this builder instance for chaining
-
ban
Indicates that the provided set of keys may not be specified by the user. This can include control fields- Parameters:
keys
- a list of keys to ban- Returns:
- this builder instance for chaining
-
allowOnly
Allow only the provided set of keys, and special keys. Generally it will also be necessary to ban text queries too usingbanTextQuery()
- Parameters:
keys
- the keys to be permitted (in addition, special _ keys will be permitted)- Returns:
- this builder instance for chaining
-
allowOnlyStrict
Allow only the provided set of keys. Any special keys must also be explicitly whitelisted- Parameters:
keys
- the keys to be permitted- Returns:
- this builder instance for chaining
-
build
-