Class SearchAggregationImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.search.internal.models.SearchAggregationImpl
-
- All Implemented Interfaces:
SearchAggregation
public class SearchAggregationImpl extends Object implements SearchAggregation
Basic implementation ofSearchAggregation
.
-
-
Constructor Summary
Constructors Constructor Description SearchAggregationImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
getAppliedFilterDisplayLabel()
Get the filter display label.Optional<String>
getAppliedFilterValue()
Get the currently applied filter value.String
getDisplayLabel()
Get the aggregation display label.boolean
getFilterable()
Whether or not this aggregation can actually be used to filter results.String
getIdentifier()
The identifier (e.g.int
getOptionCount()
Get the number of aggregation options exist for the current aggregation.List<SearchAggregationOption>
getOptions()
Get the search aggregation options available for this aggregation.Map<String,String>
getRemoveFilterMap()
Get the map of attributes that will remove this aggregation from results.void
setAppliedFilterDisplayLabel(String appliedFilterDisplayLabel)
void
setAppliedFilterValue(String appliedFilterValue)
void
setCount(int count)
void
setDisplayLabel(String displayLabel)
void
setFilterable(boolean filterable)
void
setIdentifier(String identifier)
void
setOptions(List<SearchAggregationOption> options)
void
setRemoveFilters(Map<String,String> removeFilters)
-
-
-
Method Detail
-
getAppliedFilterValue
@Nonnull public Optional<String> getAppliedFilterValue()
Description copied from interface:SearchAggregation
Get the currently applied filter value.- Specified by:
getAppliedFilterValue
in interfaceSearchAggregation
- Returns:
- the applied filter value
-
getAppliedFilterDisplayLabel
@Nonnull public Optional<String> getAppliedFilterDisplayLabel()
Description copied from interface:SearchAggregation
Get the filter display label.- Specified by:
getAppliedFilterDisplayLabel
in interfaceSearchAggregation
- Returns:
- the applied filter display label
-
getFilterable
@Nonnull public boolean getFilterable()
Description copied from interface:SearchAggregation
Whether or not this aggregation can actually be used to filter results.- Specified by:
getFilterable
in interfaceSearchAggregation
- Returns:
- true if available for filtering
-
getIdentifier
@Nonnull public String getIdentifier()
Description copied from interface:SearchAggregation
The identifier (e.g. the attribute code) for this aggregation.- Specified by:
getIdentifier
in interfaceSearchAggregation
- Returns:
- the identifier for the aggregation
-
getDisplayLabel
@Nonnull public String getDisplayLabel()
Description copied from interface:SearchAggregation
Get the aggregation display label.- Specified by:
getDisplayLabel
in interfaceSearchAggregation
- Returns:
- the aggregation display label
-
getOptionCount
@Nonnull public int getOptionCount()
Description copied from interface:SearchAggregation
Get the number of aggregation options exist for the current aggregation.- Specified by:
getOptionCount
in interfaceSearchAggregation
- Returns:
- the number of aggregation options
-
getOptions
@Nonnull public List<SearchAggregationOption> getOptions()
Description copied from interface:SearchAggregation
Get the search aggregation options available for this aggregation.- Specified by:
getOptions
in interfaceSearchAggregation
- Returns:
- the options
-
getRemoveFilterMap
@Nonnull public Map<String,String> getRemoveFilterMap()
Description copied from interface:SearchAggregation
Get the map of attributes that will remove this aggregation from results.- Specified by:
getRemoveFilterMap
in interfaceSearchAggregation
- Returns:
- the filters without this aggregation filter
-
setIdentifier
public void setIdentifier(String identifier)
-
setDisplayLabel
public void setDisplayLabel(String displayLabel)
-
setAppliedFilterValue
public void setAppliedFilterValue(String appliedFilterValue)
-
setAppliedFilterDisplayLabel
public void setAppliedFilterDisplayLabel(String appliedFilterDisplayLabel)
-
setFilterable
public void setFilterable(boolean filterable)
-
setCount
public void setCount(int count)
-
setOptions
public void setOptions(List<SearchAggregationOption> options)
-
-