public class

ChainedSearchFilter

extends Object
implements SearchFilter
java.lang.Object
   ↳ com.atlassian.confluence.search.v2.searchfilter.ChainedSearchFilter

Class Overview

Allows multiple SearchFilters to be chained together, with the option to specify the logical operator to apply between them.

Summary

Nested Classes
enum ChainedSearchFilter.Operator Logic operator to allow clients to specify whether to apply a logical AND or OR between the result of filters  
Public Constructors
ChainedSearchFilter(List<? extends SearchFilter> filters, List<ChainedSearchFilter.Operator> logicOperators)
Constructs a chained search filter.
ChainedSearchFilter(List<? extends SearchFilter> filters, ChainedSearchFilter.Operator logicOperator)
Constructs a chained search filter.
ChainedSearchFilter(SearchFilter... filters)
Constructs a chained search filter that AND's the list of specified filters.
Public Methods
ChainedSearchFilter and(SearchFilter other)
Combines this filter with the one specified, returning a new filter.
boolean equals(Object obj)
List<SearchFilter> getFilters()
String getKey()
List<ChainedSearchFilter.Operator> getOperators()
int hashCode()
ChainedSearchFilter merge(ChainedSearchFilter other)
ChainedSearchFilter or(SearchFilter other)
Combines this filter with the one specified, returning a new filter.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.search.v2.SearchFilter

Public Constructors

public ChainedSearchFilter (List<? extends SearchFilter> filters, List<ChainedSearchFilter.Operator> logicOperators)

Constructs a chained search filter.

Parameters
filters the filters. Nested ChainedSearchFilter not supported.
logicOperators the operator to appy for the corresponding filter
Throws
IllegalArgumentException if specified filters is null or empty or if the size of filters differs from the size of logicOperators or if one of the filters specified is a ChainedSearchFilter

public ChainedSearchFilter (List<? extends SearchFilter> filters, ChainedSearchFilter.Operator logicOperator)

Constructs a chained search filter.

Parameters
filters the filters. Nested ChainedSearchFilter not supported.
logicOperator operator to apply to all filters
Throws
IllegalArgumentException if specified filters is null or empty or if one of the filters specified is a ChainedSearchFilter

public ChainedSearchFilter (SearchFilter... filters)

Constructs a chained search filter that AND's the list of specified filters.

Parameters
filters the filters. Nested ChainedSearchFilter not supported.

Public Methods

public ChainedSearchFilter and (SearchFilter other)

Combines this filter with the one specified, returning a new filter. To pass the new filter, matches to both the original filters are required.

Parameters
other the other filter.
Returns
  • a new filter

public boolean equals (Object obj)

public List<SearchFilter> getFilters ()

public String getKey ()

public List<ChainedSearchFilter.Operator> getOperators ()

public int hashCode ()

public ChainedSearchFilter merge (ChainedSearchFilter other)

Returns
  • a new chained search filter that merges this and other. If other is this or null or empty, returns this.

public ChainedSearchFilter or (SearchFilter other)

Combines this filter with the one specified, returning a new filter. To pass the new filter, there must be a match in at least one of the original filters.

Parameters
other the other filter
Returns
  • a new filter

public String toString ()