Package org.forgerock.am.cts.api.filter
Class TokenFilterBuilder.FilterAttributeBuilder
java.lang.Object
org.forgerock.am.cts.api.filter.TokenFilterBuilder.FilterAttributeBuilder
- Enclosing class:
- TokenFilterBuilder
Used when the
TokenFilterBuilder is in either TokenFilterBuilder.and() or TokenFilterBuilder.or() mode.-
Method Summary
Modifier and TypeMethodDescriptionbuild()returnAttribute(CoreTokenField field) If you only require the returned CTS Tokens to contains a subset of the standardCoreTokenField.values()then this method allows the caller to specify the fields they would like in the returned CTS Tokens.withAttribute(CoreTokenField field, Object value) Filters the result CTS Tokens to only include those that have the matching attribute.withPriorityAttribute(CoreTokenField field, Object value) A variant ofwithAttribute(CoreTokenField, Object)which changes the order of the filter arguments to allow the underlying backend to efficiently run the query.withPriorityQueryFilter(QueryFilter queryFilter) A variant which changes the order of the filter arguments to allow the underlying backend to efficiently run the query.
-
Method Details
-
withAttribute
Filters the result CTS Tokens to only include those that have the matching attribute. This filter will be combined depending on the mode of the Builder and so will depend on the preceding call to eitherTokenFilterBuilder.and()orTokenFilterBuilder.or().- Parameters:
field- Non nullCoreTokenFieldto filter on.value- Non null value that matching CTS Tokens must contain.- Returns:
- This FilterAttributeBuilder.
-
withPriorityAttribute
public TokenFilterBuilder.FilterAttributeBuilder withPriorityAttribute(CoreTokenField field, Object value) A variant ofwithAttribute(CoreTokenField, Object)which changes the order of the filter arguments to allow the underlying backend to efficiently run the query.- Parameters:
field- Non nullCoreTokenFieldto filter on.value- Non null value that matching CTS Tokens must contain.- Returns:
- This FilterAttributeBuilder.
- See Also:
-
withPriorityQueryFilter
A variant which changes the order of the filter arguments to allow the underlying backend to efficiently run the query.- Parameters:
queryFilter- Non nullQueryFilterto filter on.- Returns:
- This FilterAttributeBuilder.
-
returnAttribute
If you only require the returned CTS Tokens to contains a subset of the standardCoreTokenField.values()then this method allows the caller to specify the fields they would like in the returned CTS Tokens.- Parameters:
field- The required attribute to return from the query.- Returns:
- This query builder.
-
build
- Returns:
- The assembled TokenFilter.
-