Package org.opencms.jsp.search.result
Class CmsSearchStateParameters
- java.lang.Object
-
- org.opencms.jsp.search.result.CmsSearchStateParameters
-
- All Implemented Interfaces:
I_CmsSearchStateParameters
public class CmsSearchStateParameters extends java.lang.Object implements I_CmsSearchStateParameters
State parameter wrapper that allows to manipulate the request parameters representing the state of the current search. It can be used to generate links for an adjusted search.
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
LOG
Logger for the class.
-
Constructor Summary
Constructors Constructor Description CmsSearchStateParameters(I_CmsSearchResultWrapper result, java.util.Map<java.lang.String,java.lang.String[]> params)
Constructor for a state parameters object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,I_CmsSearchStateParameters>
getAddIgnoreFacetLimit()
Returns the search state parameters with the parameter for ignoring a facet's (specified by first key) limit added.java.util.Map<java.lang.String,java.util.Map<java.lang.String,I_CmsSearchStateParameters>>
getCheckFacetItem()
Returns the search state parameters with the filter query for facets (specified by first key) item (specified by the second key) added.java.util.Map<java.lang.String,I_CmsSearchStateParameters>
getNewQuery()
Returns the search state parameters with the Query parameter's value adjusted to the key of the map.java.util.Map<java.lang.String,I_CmsSearchStateParameters>
getRemoveIgnoreFacetLimit()
Returns the search state parameters with the parameter for ignoring a facet's (specified by first key) limit removed.I_CmsSearchStateParameters
getResetAllFacetStates()
Returns the search state parameters with all filter queries for facets removed.java.util.Map<java.lang.String,I_CmsSearchStateParameters>
getResetFacetState()
Returns the search state parameters with all filter queries for the facet specified as key removed.java.util.Map<java.lang.String,java.util.Map<java.lang.String,I_CmsSearchStateParameters>>
getSetAdditionalParam()
Returns the search state parameters with the additional parameter (specified by first key) set to the value (specified by the second key).java.util.Map<java.lang.String,I_CmsSearchStateParameters>
getSetPage()
Returns the search state parameters with the value for the current page's parameter replaced by the key.java.util.Map<java.lang.String,I_CmsSearchStateParameters>
getSetSortOption()
Returns the search state parameters with the value for the sort parameter replaced by the key.java.util.Map<java.lang.String,java.util.Map<java.lang.String,I_CmsSearchStateParameters>>
getUncheckFacetItem()
Returns the search state parameters with the filter query for facets (specified by first key) item (specified by the second key) removed.java.util.Map<java.lang.String,I_CmsSearchStateParameters>
getUnsetAdditionalParam()
Returns the search state parameters with the additional parameter (specified by the key) removed.static java.lang.String
paramMapToString(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Converts a parameter map to the parameter string.java.lang.String
toString()
-
-
-
Field Detail
-
LOG
protected static final org.apache.commons.logging.Log LOG
Logger for the class.
-
-
Constructor Detail
-
CmsSearchStateParameters
public CmsSearchStateParameters(I_CmsSearchResultWrapper result, java.util.Map<java.lang.String,java.lang.String[]> params)
Constructor for a state parameters object.- Parameters:
result
- The search result, according to which the parameters are manipulated.params
- The original parameter set.
-
-
Method Detail
-
paramMapToString
public static java.lang.String paramMapToString(java.util.Map<java.lang.String,java.lang.String[]> parameters)
Converts a parameter map to the parameter string.- Parameters:
parameters
- the parameter map.- Returns:
- the parameter string.
-
getAddIgnoreFacetLimit
public java.util.Map<java.lang.String,I_CmsSearchStateParameters> getAddIgnoreFacetLimit()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the parameter for ignoring a facet's (specified by first key) limit added.- Specified by:
getAddIgnoreFacetLimit
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the parameter for ignoring a facet's (specified by first key) limit added.
- See Also:
I_CmsSearchStateParameters.getAddIgnoreFacetLimit()
-
getCheckFacetItem
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,I_CmsSearchStateParameters>> getCheckFacetItem()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the filter query for facets (specified by first key) item (specified by the second key) added.- Specified by:
getCheckFacetItem
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the filter query for facets (specified by first key) item (specified by the second key) added.
- See Also:
I_CmsSearchStateParameters.getCheckFacetItem()
-
getNewQuery
public java.util.Map<java.lang.String,I_CmsSearchStateParameters> getNewQuery()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the Query parameter's value adjusted to the key of the map.- Specified by:
getNewQuery
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the Query parameter's value adjusted to the key of the map.
- See Also:
I_CmsSearchStateParameters.getNewQuery()
-
getRemoveIgnoreFacetLimit
public java.util.Map<java.lang.String,I_CmsSearchStateParameters> getRemoveIgnoreFacetLimit()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the parameter for ignoring a facet's (specified by first key) limit removed.- Specified by:
getRemoveIgnoreFacetLimit
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the parameter for ignoring a facet's (specified by first key) limit removed.
- See Also:
I_CmsSearchStateParameters.getRemoveIgnoreFacetLimit()
-
getResetAllFacetStates
public I_CmsSearchStateParameters getResetAllFacetStates()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with all filter queries for facets removed.- Specified by:
getResetAllFacetStates
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with all filter queries for facets removed.
- See Also:
I_CmsSearchStateParameters.getResetAllFacetStates()
-
getResetFacetState
public java.util.Map<java.lang.String,I_CmsSearchStateParameters> getResetFacetState()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with all filter queries for the facet specified as key removed.- Specified by:
getResetFacetState
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with all filter queries for the facet specified as key removed.
- See Also:
I_CmsSearchStateParameters.getResetFacetState()
-
getSetAdditionalParam
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,I_CmsSearchStateParameters>> getSetAdditionalParam()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the additional parameter (specified by first key) set to the value (specified by the second key).- Specified by:
getSetAdditionalParam
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the additional parameter (specified by first key) set to the value (specified by the second key).
- See Also:
I_CmsSearchStateParameters.getSetAdditionalParam()
-
getSetPage
public java.util.Map<java.lang.String,I_CmsSearchStateParameters> getSetPage()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the value for the current page's parameter replaced by the key.- Specified by:
getSetPage
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the value for the current page's parameter replaced by the key.
- See Also:
I_CmsSearchStateParameters.getSetPage()
-
getSetSortOption
public java.util.Map<java.lang.String,I_CmsSearchStateParameters> getSetSortOption()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the value for the sort parameter replaced by the key.- Specified by:
getSetSortOption
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the value for the sort parameter replaced by the key.
- See Also:
I_CmsSearchStateParameters.getSetSortOption()
-
getUncheckFacetItem
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,I_CmsSearchStateParameters>> getUncheckFacetItem()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the filter query for facets (specified by first key) item (specified by the second key) removed.- Specified by:
getUncheckFacetItem
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the filter query for facets (specified by first key) item (specified by the second key) removed.
- See Also:
I_CmsSearchStateParameters.getUncheckFacetItem()
-
getUnsetAdditionalParam
public java.util.Map<java.lang.String,I_CmsSearchStateParameters> getUnsetAdditionalParam()
Description copied from interface:I_CmsSearchStateParameters
Returns the search state parameters with the additional parameter (specified by the key) removed.- Specified by:
getUnsetAdditionalParam
in interfaceI_CmsSearchStateParameters
- Returns:
- The search state parameters with the additional parameter (specified by the key) removed.
- See Also:
I_CmsSearchStateParameters.getUnsetAdditionalParam()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-