Package org.forgerock.am.cts.api.filter
Class TokenFilter
- java.lang.Object
-
- org.forgerock.am.cts.api.filter.TokenFilter
-
public class TokenFilter extends Object
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReturnAttribute(CoreTokenField field)
Assigns an attribute to be part of the return attributes.boolean
equals(Object obj)
QueryFilter<CoreTokenField>
getQuery()
Inspect the CoreTokenField, Object pairs that have been assigned as filters.Set<CoreTokenField>
getReturnFields()
The current set of return fields.int
getSizeLimit()
Get the size limit of the query.Duration
getTimeLimit()
Get the time limit of the query.int
hashCode()
void
setQuery(QueryFilter<CoreTokenField> query)
Set the query component to the Filter.void
setTimeLimit(Duration timeLimit)
Set the time limit of the query.String
toString()
A multi-line representation of the filter.
-
-
-
Method Detail
-
getQuery
public QueryFilter<CoreTokenField> getQuery()
Inspect the CoreTokenField, Object pairs that have been assigned as filters.- Returns:
- An unmodifiable Map of filter components.
-
setQuery
public void setQuery(QueryFilter<CoreTokenField> query)
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
public Duration getTimeLimit()
Get the time limit of the query.- Returns:
- the time limit.
-
setTimeLimit
public void setTimeLimit(Duration timeLimit)
Set the time limit of the query.- Parameters:
timeLimit
- the duration the query may last.
-
getReturnFields
public Set<CoreTokenField> 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
public void addReturnAttribute(CoreTokenField field)
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
public String toString()
A multi-line representation of the filter.
-
-