public interface NavigationState
FilterState
and a collection of
URL parameters.
The interface provides methods for the following operations
Modifier and Type | Method and Description |
---|---|
NavigationState |
augment(FilterState filterState)
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
clearFilterState()
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
clearGeoFilter()
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
clearNavigationFilters()
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
clearParameters()
Create a new NavigationState relative to this one,
clearing the parameters map.
|
NavigationState |
clearRangeFilters()
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
clearRecordFilters()
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
clearSearchFilters()
Note: This method modifies the
getUrlFilterState() copy. |
String |
getCanonicalLink()
Retrieves the canonical link relative to this RecordState.
|
com.endeca.navigation.DimLocation |
getDimLocation(String dvalId)
This method is for internal Oracle use only and should never be
called.
Returns the meta-information pertaining to the given dimension value ID. |
String |
getEncoding()
Returns the character encoding that is used
when marshaling parameters and strings contained within this UrlState.
|
FilterState |
getFilterState()
The FilterState object that is returned from this
method is immutable, and never null.
|
String |
getParameter(String name)
Returns the value of the parameter with the given name,
or
null . |
FilterState |
getUrlFilterState()
This method returns a URL
FilterState . |
void |
inform(com.endeca.navigation.DimLocation dimLocation)
This method is for internal Oracle use only and should never be
called.
Informs this class of important meta-information. |
void |
inform(com.endeca.navigation.DimLocationList dimLocations)
This method is for internal Oracle use only and should never be
called.
Informs this class of important meta-information. |
void |
inform(com.endeca.navigation.ENEQueryResults results)
This method is for internal Oracle use only and should never be
called.
Informs this class of important meta-information. |
NavigationState |
putAllParameters(Map<String,String> parameters)
Create a new NavigationState relative to this one,
updating all of the specified parameters.
|
NavigationState |
putParameter(String name,
String value)
Create a new NavigationState relative to this one,
updating the specified parameter.
|
NavigationState |
removeNavigationFilter(String dvalId)
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
removeParameter(String name)
Create a new NavigationState relative to this one,
removing the specified parameter.
|
NavigationState |
selectNavigationFilter(String dvalId)
Note: This method modifies the
getUrlFilterState() copy. |
RecordState |
selectRecord(String recordSpec,
boolean isAggregateRecord)
Create a new RecordState from the given record spec.
|
NavigationState |
updateFilterState(FilterState filterState)
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
updateGeoFilter(GeoFilter geoFilter)
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
updateParameters(Map<String,String> parameters)
Create a new NavigationState relative to this one,
replacing the entire existing parameter map with the given one.
|
NavigationState |
updateRangeFilters(List<RangeFilter> rangeFilters)
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
updateRecordFilters(List<String> recordFilters)
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState |
updateSearchFilters(List<SearchFilter> searchFilters)
Note: This method modifies the
getUrlFilterState() copy. |
NavigationState updateParameters(Map<String,String> parameters)
parameters
- the new parameter mapNavigationState removeParameter(String name)
name
- the name of the parameter to removeNavigationState putParameter(String name, String value)
name
- the name of the parameter to updatevalue
- the value to update the parameter toNavigationState putAllParameters(Map<String,String> parameters)
This method is needed when adding more than one "remove always" parameter. Since such parameters have been configured to be removed whenever a new NavigationState is constructed from an existing one, they must be added all at once rather than one at a time. Otherwise, for example, the first would be removed when the second was added.
parameters
- a map containing entries where the key
corresponds to the name of the parameter to update and the
value corresponds to the value to update it toNavigationState clearParameters()
FilterState getFilterState()
You should NOT make any updates to this FilterState instance. Even if you make any updates to this FilterState, when you access this method again, your changes will not be there.
FilterState getUrlFilterState()
FilterState
. This FilterState
is used to generate action links. Also this FilterState contains
the filters that are passed in from the url.
You should NOT make any updates to this filter state object
directly. Instead of changing this FilterState, you should use
the utility methods such as updateFilterState(FilterState)
,
updateRecordFilters(List)
, clearGeoFilter()
NavigationState updateFilterState(FilterState filterState)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
replacing the existing getUrlFilterState()
object
with the given one.
filterState
- the new FilterState objectNavigationState clearFilterState()
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
clearing the getUrlFilterState()
object of the following:
FilterState.getSearchFilters()
- clears to an empty listFilterState.getNavigationFilters()
- clears to an empty listFilterState.getRangeFilters()
- clears to an empty listFilterState.getRecordFilters()
- clears to an empty listFilterState.getFeaturedRecords()
- clears to an empty listFilterState.getGeoFilter()
- clears to nullNavigationState augment(FilterState filterState)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
augmented with the specified getFilterState()
.
The difference between the getFilterState()
and
filterState
is added to the getUrlFilterState()
.
If the auxiliary filter state includes a dimensional refinement, then any refinements of the same dimension in this NavigationState are excluded from the result, except in the case of a multi-select dimension, in which case they are merged into the result.
filterState
- A set of filter terms that supplement and/or
replace those of this NavigationStateNavigationState selectNavigationFilter(String dvalId)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
selecting the specified navigation filter from the getUrlFilterState()
.
Other navigation filters from the same dimension will be removed,
except if the dimension is enabled for multi-select, in which
case the siblings of the specified navigation filter will be retained.
This method can be used to select both refinements and ancestors.
dvalId
- the navigation filter (i.e. dimension value ID)NavigationState removeNavigationFilter(String dvalId)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
removing the specified navigation filter from the getUrlFilterState()
.
Other navigation filters that are descendants of the specified navigation
filter will be removed.
This method can be used to remove a single descriptor. It can also be used to remove all navigation filters from a single dimension by supplying the root navigation filter (i.e. dimension ID).
dvalId
- - the navigation filter (i.e. dimension value ID)NavigationState clearNavigationFilters()
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
clearing the navigation filters from the getUrlFilterState()
.
FilterState.getNavigationFilters()
NavigationState clearSearchFilters()
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
removing the searches from the getUrlFilterState()
.
FilterState.getSearchFilters()
NavigationState clearRangeFilters()
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
removing the range filters from the getUrlFilterState()
.
FilterState.getRangeFilters()
NavigationState clearGeoFilter()
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
removing the geo filter from the getUrlFilterState()
.
FilterState.getGeoFilter()
NavigationState clearRecordFilters()
getUrlFilterState()
copy.
Create a new NavigationState relative to this one,
removing the record filters from the getUrlFilterState()
.
FilterState.getRecordFilters()
NavigationState updateSearchFilters(List<SearchFilter> searchFilters)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one, with any existing search filters replaced by those in the given list.
searchFilters
- the new searchesFilterState.getSearchFilters()
NavigationState updateRangeFilters(List<RangeFilter> rangeFilters)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one, with any existing range filters replaced by those in the given list.
rangeFilters
- the new range filtersFilterState.getRangeFilters()
NavigationState updateGeoFilter(GeoFilter geoFilter)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one, with the existing GeoFilter (if any) replaced by the given one.
geoFilter
- the new GeoFilterFilterState.getGeoFilter()
NavigationState updateRecordFilters(List<String> recordFilters)
getUrlFilterState()
copy.
Create a new NavigationState relative to this one, with any existing record filters replaced by those in the given list.
recordFilters
- the new record filtersFilterState.getRecordFilters()
RecordState selectRecord(String recordSpec, boolean isAggregateRecord)
recordSpec
- the record specisAggregateRecord
- whether the spec represents an aggregate recordvoid inform(com.endeca.navigation.ENEQueryResults results)
results
- a Presentation API ENEQueryResults object
containing the meta-informationvoid inform(com.endeca.navigation.DimLocation dimLocation)
dimLocation
- a Presentation API DimLocation object
containing the meta-informationvoid inform(com.endeca.navigation.DimLocationList dimLocations)
dimLocations
- a Presentation API DimLocationList object
containing the meta-informationcom.endeca.navigation.DimLocation getDimLocation(String dvalId)
dvalId
- The dimension value IDnull
otherwise.String getCanonicalLink()
String getParameter(String name)
null
.String getEncoding()
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.