public class VaultQuery extends Object
Predicate
. A new (empty) query evaluates
unconditionally to true and can be composed using and(VaultQuery)
and or(VaultQuery)
.
A query can express predicates only against the
Id
field of a SecretDocument
.Constructor and Description |
---|
VaultQuery()
Create a new
VaultQuery that evaluates unconditionally to true. |
VaultQuery(Predicate<String> predicate)
Create a new
VaultQuery given Predicate . |
Modifier and Type | Method and Description |
---|---|
VaultQuery |
and(Predicate<String> predicate)
|
VaultQuery |
and(VaultQuery other)
|
Predicate<String> |
getPredicate() |
VaultQuery |
or(VaultQuery other)
|
boolean |
test(SecretDocument document)
Evaluate the query against a
SecretDocument . |
boolean |
test(String id)
Evaluate the query against a
String . |
public VaultQuery()
VaultQuery
that evaluates unconditionally to true.public VaultQuery(Predicate<String> predicate)
VaultQuery
given Predicate
.predicate
- must not be null.public boolean test(SecretDocument document)
SecretDocument
.document
- must not be null.public boolean test(String id)
String
.id
- must not be null.public VaultQuery and(VaultQuery other)
other
- must not be null.VaultQuery
.Predicate.and(Predicate)
public VaultQuery and(Predicate<String> predicate)
predicate
- must not be null.VaultQuery
.Predicate.and(Predicate)
public VaultQuery or(VaultQuery other)
other
- must not be null.VaultQuery
.Predicate.and(Predicate)
Copyright © 2016–2021 Pivotal Software, Inc.. All rights reserved.