Package org.forgerock.am.cts.api.filter
Class TokenFilterBuilder.FilterAttributeBuilder
- java.lang.Object
-
- org.forgerock.am.cts.api.filter.TokenFilterBuilder.FilterAttributeBuilder
-
- Enclosing class:
- TokenFilterBuilder
public class TokenFilterBuilder.FilterAttributeBuilder extends Object
Used when theTokenFilterBuilder
is in eitherTokenFilterBuilder.and()
orTokenFilterBuilder.or()
mode.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenFilter
build()
TokenFilterBuilder.FilterAttributeBuilder
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.TokenFilterBuilder.FilterAttributeBuilder
withAttribute(CoreTokenField field, Object value)
Filters the result CTS Tokens to only include those that have the matching attribute.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.TokenFilterBuilder.FilterAttributeBuilder
withPriorityQueryFilter(QueryFilter queryFilter)
A variant which changes the order of the filter arguments to allow the underlying backend to efficiently run the query.
-
-
-
Method Detail
-
withAttribute
public TokenFilterBuilder.FilterAttributeBuilder withAttribute(CoreTokenField field, Object value)
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 nullCoreTokenField
to 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 nullCoreTokenField
to filter on.value
- Non null value that matching CTS Tokens must contain.- Returns:
- This FilterAttributeBuilder.
- See Also:
withAttribute(CoreTokenField, Object)
-
withPriorityQueryFilter
public TokenFilterBuilder.FilterAttributeBuilder withPriorityQueryFilter(QueryFilter queryFilter)
A variant which changes the order of the filter arguments to allow the underlying backend to efficiently run the query.- Parameters:
queryFilter
- Non nullQueryFilter
to filter on.- Returns:
- This FilterAttributeBuilder.
-
returnAttribute
public TokenFilterBuilder.FilterAttributeBuilder 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.- Parameters:
field
- The required attribute to return from the query.- Returns:
- This query builder.
-
build
public TokenFilter build()
- Returns:
- The assembled TokenFilter.
-
-