com.elasticpath.domain.catalogview
Interface RangeFilter

All Superinterfaces:
BranchNode, java.lang.Comparable, EpDomain, Filter, java.io.Serializable, Transient
All Known Subinterfaces:
AttributeRangeFilter, PriceFilter
All Known Implementing Classes:
AbstractRangeFilterImpl, AttributeRangeFilterImpl, PriceFilterImpl

public interface RangeFilter
extends Filter, BranchNode

This defines the filter which has a range value. When this filter is applied on an object, the object will be rejected if its value not falls into the range.


Field Summary
static java.lang.String ALL
          The range contains all the values.
static java.lang.String AND
          The range has both upper and lower value set.
static java.lang.String BETWEEN
          The range has both upper and lower value set.
static java.lang.String LESSTHAN
          The range has only upper value set.
static int LOWER_VALUE_POSITION
          The lower value position.
static java.lang.String MORETHAN
          The range has only lower value set.
static int RANGE_TOKENS
          Range Token counts.
static int UPPER_VALUE_POSITION
          The heigher value position.
 
Fields inherited from interface com.elasticpath.domain.catalogview.Filter
ERROR_MSG, SEPARATOR, SEPARATOR_IN_REGEX
 
Method Summary
 void addChild(RangeFilter childFilter)
          Add the given filter as a child.
 void addDisplayInfo(java.util.Locale locale, FilterDisplayInfo displayInfo)
          Add a localized display info in the localized map.
 boolean contains(RangeFilter filter)
          Returns true if this filter contains the given filter.
 java.util.Set getChildren()
          Get the children filters.
 FilterDisplayInfo getDisplayInfo(java.util.Locale locale)
          Get the localized display info map.
 java.util.Map getLocalizedDisplayMap()
          Get the localized display map.
 java.lang.Object getLowerValue()
          Returns the lower value of the filter.
 RangeFilter getParent()
          Get the parent filter of this filter.
 java.lang.String getRangeType()
          Get the range type.
 java.lang.Object getUpperValue()
          Returns the upper value of the filter.
 void setLocalizedDisplayMap(java.util.Map displayMap)
          Set the localized display map.
 void setLowerValue(java.lang.Object lowerValue)
          Set the lower value for the range.
 void setParent(RangeFilter parent)
          Set the parent filter of this filter.
 void setRangeType(java.lang.String rangeType)
          Set the range type.
 void setUpperValue(java.lang.Object upperValue)
          Set the upper value for the range.
 
Methods inherited from interface com.elasticpath.domain.catalogview.Filter
filter, getDisplayName, getId, getSeoId, getSeoName, initialize, isLocalized, match, setId, setLocalized
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.elasticpath.domain.catalogview.BranchNode
getLevel, getPath
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

ALL

static final java.lang.String ALL
The range contains all the values.

See Also:
Constant Field Values

AND

static final java.lang.String AND
The range has both upper and lower value set.

See Also:
Constant Field Values

BETWEEN

static final java.lang.String BETWEEN
The range has both upper and lower value set.

See Also:
Constant Field Values

LESSTHAN

static final java.lang.String LESSTHAN
The range has only upper value set.

See Also:
Constant Field Values

LOWER_VALUE_POSITION

static final int LOWER_VALUE_POSITION
The lower value position.

See Also:
Constant Field Values

MORETHAN

static final java.lang.String MORETHAN
The range has only lower value set.

See Also:
Constant Field Values

RANGE_TOKENS

static final int RANGE_TOKENS
Range Token counts.

See Also:
Constant Field Values

UPPER_VALUE_POSITION

static final int UPPER_VALUE_POSITION
The heigher value position.

See Also:
Constant Field Values
Method Detail

addChild

void addChild(RangeFilter childFilter)
Add the given filter as a child.

Parameters:
childFilter - the filter to be added as a child

addDisplayInfo

void addDisplayInfo(java.util.Locale locale,
                    FilterDisplayInfo displayInfo)
Add a localized display info in the localized map.

Parameters:
locale - the given locale.
displayInfo - the displayInfo.

contains

boolean contains(RangeFilter filter)
Returns true if this filter contains the given filter.

Parameters:
filter - the given filter
Returns:
true if this filter contains the given filter

getChildren

java.util.Set getChildren()
Get the children filters.

Returns:
the children filters as a set

getDisplayInfo

FilterDisplayInfo getDisplayInfo(java.util.Locale locale)
Get the localized display info map.

Parameters:
locale - the given locale.
Returns:
the display info for this locale

getLocalizedDisplayMap

java.util.Map getLocalizedDisplayMap()
Get the localized display map.

Returns:
the displayMap

getLowerValue

java.lang.Object getLowerValue()
Returns the lower value of the filter.

Returns:
the lower value of the filter.

getParent

RangeFilter getParent()
Get the parent filter of this filter. Returns null if this filter is a root node.

Returns:
the parent filter or null if it is a root node

getRangeType

java.lang.String getRangeType()
Get the range type. The range type will be one of the MORETHAN / LESSTHAN / BETWEEN.

Returns:
the rangeType

getUpperValue

java.lang.Object getUpperValue()
Returns the upper value of the filter.

Returns:
the upper value of the filter.

setLocalizedDisplayMap

void setLocalizedDisplayMap(java.util.Map displayMap)
Set the localized display map.

Parameters:
displayMap - the displayMap to set

setLowerValue

void setLowerValue(java.lang.Object lowerValue)
Set the lower value for the range.

Parameters:
lowerValue - the lowerValue to set

setParent

void setParent(RangeFilter parent)
Set the parent filter of this filter.

Parameters:
parent - the parent filter

setRangeType

void setRangeType(java.lang.String rangeType)
Set the range type. The range type will be one of the MORETHAN / LESSTHAN / BETWEEN.

Parameters:
rangeType - the rangeType to set

setUpperValue

void setUpperValue(java.lang.Object upperValue)
Set the upper value for the range.

Parameters:
upperValue - the upperValue to set