Class DefaultFacetSearchContext
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.search.context.impl.DefaultFacetSearchContext
-
- All Implemented Interfaces:
FacetSearchContext
public class DefaultFacetSearchContext extends java.lang.Object implements FacetSearchContext
Default implementation ofFacetSearchContext
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.solrfacetsearch.search.context.FacetSearchContext
FacetSearchContext.Status
-
-
Constructor Summary
Constructors Constructor Description DefaultFacetSearchContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFailureException(java.lang.Exception exception)
java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
Returns aMap
instance that can be used to store attributes.java.util.List<IndexedTypeSort>
getAvailableNamedSorts()
Return list of available named sorts.FacetSearchConfig
getFacetSearchConfig()
Returns the facet search configuration.java.util.List<java.lang.Exception>
getFailureExceptions()
Returns all failure causing exceptions for thisFacetSearchContext
.IndexedType
getIndexedType()
Returns the indexed type.IndexedTypeSort
getNamedSort()
Return current named sort.java.util.Collection<CatalogVersionModel>
getParentSessionCatalogVersions()
Returns the parent session catalog versions (the catalog versions that are in the session when this context is created).java.util.Map<java.lang.String,java.lang.String>
getSearchHints()
Returns a mutableMap
that can be used to store search hints.SearchQuery
getSearchQuery()
Returns the search query.SearchResult
getSearchResult()
Returns the search result.FacetSearchContext.Status
getStatus()
Returns the current status for thisFacetSearchContext
void
setAvailableNamedSorts(java.util.List<IndexedTypeSort> availableNamedSorts)
void
setFacetSearchConfig(FacetSearchConfig facetSearchConfig)
void
setIndexedType(IndexedType indexedType)
void
setNamedSort(IndexedTypeSort namedSort)
Sets current named sortIndexedTypeSort
.void
setParentSessionCatalogVersions(java.util.Collection<CatalogVersionModel> parentSessionCatalogVersions)
void
setSearchQuery(SearchQuery searchQuery)
void
setSearchResult(SearchResult searchResult)
Sets the search result.void
setStatus(FacetSearchContext.Status status)
-
-
-
Method Detail
-
getFacetSearchConfig
public FacetSearchConfig getFacetSearchConfig()
Description copied from interface:FacetSearchContext
Returns the facet search configuration.- Specified by:
getFacetSearchConfig
in interfaceFacetSearchContext
- Returns:
- the facet search configuration
-
setFacetSearchConfig
public void setFacetSearchConfig(FacetSearchConfig facetSearchConfig)
-
getIndexedType
public IndexedType getIndexedType()
Description copied from interface:FacetSearchContext
Returns the indexed type.- Specified by:
getIndexedType
in interfaceFacetSearchContext
- Returns:
- the indexed type
-
setIndexedType
public void setIndexedType(IndexedType indexedType)
-
getSearchQuery
public SearchQuery getSearchQuery()
Description copied from interface:FacetSearchContext
Returns the search query.- Specified by:
getSearchQuery
in interfaceFacetSearchContext
- Returns:
- the search query
-
setSearchQuery
public void setSearchQuery(SearchQuery searchQuery)
-
getSearchResult
public SearchResult getSearchResult()
Description copied from interface:FacetSearchContext
Returns the search result.- Specified by:
getSearchResult
in interfaceFacetSearchContext
- Returns:
- the search result
-
setSearchResult
public void setSearchResult(SearchResult searchResult)
Description copied from interface:FacetSearchContext
Sets the search result.- Specified by:
setSearchResult
in interfaceFacetSearchContext
-
getParentSessionCatalogVersions
public java.util.Collection<CatalogVersionModel> getParentSessionCatalogVersions()
Description copied from interface:FacetSearchContext
Returns the parent session catalog versions (the catalog versions that are in the session when this context is created).- Specified by:
getParentSessionCatalogVersions
in interfaceFacetSearchContext
- Returns:
- the parent session catalog versions
-
setParentSessionCatalogVersions
public void setParentSessionCatalogVersions(java.util.Collection<CatalogVersionModel> parentSessionCatalogVersions)
-
getSearchHints
public java.util.Map<java.lang.String,java.lang.String> getSearchHints()
Description copied from interface:FacetSearchContext
Returns a mutableMap
that can be used to store search hints.- Specified by:
getSearchHints
in interfaceFacetSearchContext
- Returns:
- the map containing the search hints
-
getStatus
public FacetSearchContext.Status getStatus()
Description copied from interface:FacetSearchContext
Returns the current status for thisFacetSearchContext
- Specified by:
getStatus
in interfaceFacetSearchContext
- Returns:
- the current status
-
setStatus
public void setStatus(FacetSearchContext.Status status)
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Description copied from interface:FacetSearchContext
Returns aMap
instance that can be used to store attributes. The attributes are only valid for the duration of the search process.- Specified by:
getAttributes
in interfaceFacetSearchContext
- Returns:
- the map containing the attributes
-
addFailureException
public void addFailureException(java.lang.Exception exception)
-
getFailureExceptions
public java.util.List<java.lang.Exception> getFailureExceptions()
Description copied from interface:FacetSearchContext
Returns all failure causing exceptions for thisFacetSearchContext
.- Specified by:
getFailureExceptions
in interfaceFacetSearchContext
-
getAvailableNamedSorts
public java.util.List<IndexedTypeSort> getAvailableNamedSorts()
Description copied from interface:FacetSearchContext
Return list of available named sorts.- Specified by:
getAvailableNamedSorts
in interfaceFacetSearchContext
- Returns:
- List of
IndexedTypeSort
-
setAvailableNamedSorts
public void setAvailableNamedSorts(java.util.List<IndexedTypeSort> availableNamedSorts)
-
getNamedSort
public IndexedTypeSort getNamedSort()
Description copied from interface:FacetSearchContext
Return current named sort.- Specified by:
getNamedSort
in interfaceFacetSearchContext
- Returns:
- Current named sort
IndexedTypeSort
-
setNamedSort
public void setNamedSort(IndexedTypeSort namedSort)
Description copied from interface:FacetSearchContext
Sets current named sortIndexedTypeSort
.- Specified by:
setNamedSort
in interfaceFacetSearchContext
-
-