com.atlassian.confluence.search.v2.searchfilter
Class ChainedSearchFilter

java.lang.Object
  extended by com.atlassian.confluence.search.v2.searchfilter.ChainedSearchFilter
All Implemented Interfaces:
SearchFilter

public class ChainedSearchFilter
extends java.lang.Object
implements SearchFilter

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


Nested Class Summary
static class ChainedSearchFilter.Operator
          Logic operator to allow clients to specify whether to apply a logical AND or OR between the result of filters
 
Constructor Summary
ChainedSearchFilter(java.util.List<SearchFilter> filters, ChainedSearchFilter.Operator logicOperator)
          Constructs a chained search filter.
ChainedSearchFilter(java.util.List<SearchFilter> filters, java.util.List<ChainedSearchFilter.Operator> logicOperators)
          Constructs a chained search filter.
ChainedSearchFilter(SearchFilter... filters)
          Constructs a chained search filter that AND's the list of specified filters.
 
Method Summary
 java.util.List<SearchFilter> getFilters()
           
 java.lang.String getKey()
           
 java.util.List<ChainedSearchFilter.Operator> getOperators()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainedSearchFilter

public ChainedSearchFilter(java.util.List<SearchFilter> filters,
                           java.util.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:
java.lang.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

ChainedSearchFilter

public ChainedSearchFilter(java.util.List<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:
java.lang.IllegalArgumentException - if specified filters is null or empty or if one of the filters specified is a ChainedSearchFilter

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.
Method Detail

getFilters

public java.util.List<SearchFilter> getFilters()

getOperators

public java.util.List<ChainedSearchFilter.Operator> getOperators()

getKey

public java.lang.String getKey()
Specified by:
getKey in interface SearchFilter
Returns:
the plugin key


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.