Class SearchSession
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.session.SearchSession
-
public class SearchSession extends Object
Contains data associated with the current user and search session.
Session features must be enabled on the collection and the application container session management must be properly configured.
- Since:
- 12.5
-
-
Field Summary
Fields Modifier and Type Field Description private List<ClickHistory>
clickHistory
Click history of the user for the current collection.private List<CartResult>
resultsCart
Results cart of the user for the current collectionprivate List<SearchHistory>
searchHistory
Search history of the user for the current collection.private SearchUser
searchUser
User performing the search.
-
Constructor Summary
Constructors Constructor Description SearchSession(SearchUser searchUser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cartContains(String indexUrl)
Check if the cart contains a specific resultList<ClickHistory>
getClickHistory()
Click history of the user for the current collection.ClickHistory
getClickHistory(String indexUrl)
Retrieve the clich history for a specific resultList<CartResult>
getResultsCart()
Results cart of the user for the current collectionList<SearchHistory>
getSearchHistory()
Search history of the user for the current collection.SearchUser
getSearchUser()
User performing the search.
-
-
-
Field Detail
-
searchUser
private final SearchUser searchUser
User performing the search.
Will be the same across multiple searches for a given user.
-
searchHistory
private final List<SearchHistory> searchHistory
Search history of the user for the current collection.
-
clickHistory
private final List<ClickHistory> clickHistory
Click history of the user for the current collection.
-
resultsCart
private final List<CartResult> resultsCart
Results cart of the user for the current collection- Since:
- 12.4
-
-
Constructor Detail
-
SearchSession
public SearchSession(SearchUser searchUser)
-
-
Method Detail
-
cartContains
public boolean cartContains(String indexUrl)
Check if the cart contains a specific result- Parameters:
indexUrl
- URL of the result from the index- Returns:
- true if the cart contains this result, false otherwise
-
getClickHistory
public ClickHistory getClickHistory(String indexUrl)
Retrieve the clich history for a specific result- Parameters:
indexUrl
- URL of the result from the index- Returns:
- The click history, or null if this result wasn't clicked.
-
getSearchUser
public SearchUser getSearchUser()
User performing the search.
Will be the same across multiple searches for a given user.
-
getSearchHistory
public List<SearchHistory> getSearchHistory()
Search history of the user for the current collection.
-
getClickHistory
public List<ClickHistory> getClickHistory()
Click history of the user for the current collection.
-
getResultsCart
public List<CartResult> getResultsCart()
Results cart of the user for the current collection- Since:
- 12.4
-
-