Class SearchSession
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.session.SearchSession
-
public class SearchSession extends java.lang.ObjectContains 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 java.util.List<ClickHistory>clickHistoryClick history of the user for the current collection.private java.util.List<CartResult>resultsCartResults cart of the user for the current collectionprivate java.util.List<SearchHistory>searchHistorySearch history of the user for the current collection.private SearchUsersearchUserUser performing the search.
-
Constructor Summary
Constructors Constructor Description SearchSession(SearchUser searchUser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancartContains(java.lang.String indexUrl)Check if the cart contains a specific resultjava.util.List<ClickHistory>getClickHistory()Click history of the user for the current collection.ClickHistorygetClickHistory(java.lang.String indexUrl)Retrieve the clich history for a specific resultjava.util.List<CartResult>getResultsCart()Results cart of the user for the current collectionjava.util.List<SearchHistory>getSearchHistory()Search history of the user for the current collection.SearchUsergetSearchUser()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 java.util.List<SearchHistory> searchHistory
Search history of the user for the current collection.
-
clickHistory
private final java.util.List<ClickHistory> clickHistory
Click history of the user for the current collection.
-
resultsCart
private final java.util.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(java.lang.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(java.lang.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 java.util.List<SearchHistory> getSearchHistory()
Search history of the user for the current collection.
-
getClickHistory
public java.util.List<ClickHistory> getClickHistory()
Click history of the user for the current collection.
-
getResultsCart
public java.util.List<CartResult> getResultsCart()
Results cart of the user for the current collection- Since:
- 12.4
-
-