Package org.forgerock.am.cts.api.filter
Class TokenFilter
java.lang.Object
org.forgerock.am.cts.api.filter.TokenFilter
Describes a collection of filters which can be applied to the CTS query function
as part of a complex query.
This filter only currently supports single type And/Or filtering. This is not a
technical limitation and can be extended in the future.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddReturnAttribute(CoreTokenField field) Assigns an attribute to be part of the return attributes.booleangetQuery()Inspect the CoreTokenField, Object pairs that have been assigned as filters.The current set of return fields.intGet the size limit of the query.Get the time limit of the query.inthashCode()voidsetQuery(QueryFilter<CoreTokenField> query) Set the query component to the Filter.voidsetTimeLimit(Duration timeLimit) Set the time limit of the query.toString()A multi-line representation of the filter.
-
Method Details
-
getQuery
Inspect the CoreTokenField, Object pairs that have been assigned as filters.- Returns:
- An unmodifiable Map of filter components.
-
setQuery
Set the query component to the Filter.- Parameters:
query- Non null query.
-
getSizeLimit
public int getSizeLimit()Get the size limit of the query.- Returns:
- the size limit.
-
getTimeLimit
Get the time limit of the query.- Returns:
- the time limit.
-
setTimeLimit
Set the time limit of the query.- Parameters:
timeLimit- the duration the query may last.
-
getReturnFields
The current set of return fields. If this collection is empty, this indicates that all fields are to be returned.- Returns:
- A non null, possibly empty, non-modifiable Set of return attributes.
-
addReturnAttribute
Assigns an attribute to be part of the return attributes. When a return attribute is provided, the return results of the query will only populate the indicated return attributes. The default is for all attributes to be returned, unless the query constrains the results using this function.- Parameters:
field- The CoreTokenField to include in the return results.
-
toString
A multi-line representation of the filter. -
equals
-
hashCode
public int hashCode()
-