public class SearchContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchContext.ContextLangAndCurrentLang
Class wrapping a
ContextLang and the current lang. |
static class |
SearchContext.LangQueryProducer
Class wrapping an implementation of
Query in order to SearchContext.LangQueryProducer.produce(org.ametys.web.frontoffice.search.instance.model.SearchContext.ContextLangAndCurrentLang) the final query executed for limiting the context language for a given Returnable . |
Modifier and Type | Field and Description |
---|---|
private ContextLang |
_langs |
private SitemapContext |
_sitemap |
private SiteContext |
_sites |
private boolean |
_tagAutoposting |
private List<String> |
_tagIds |
Constructor and Description |
---|
SearchContext(SiteContext sites,
SitemapContext sitemap,
ContextLang langs,
List<String> tags,
boolean tagAutoposting)
Creates a SearchContext
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
SearchContext.ContextLangAndCurrentLang |
getContextLang(String currentLang)
Gets the
ContextLang and the current lang |
Query |
getSitemapQuery(Page currentPage)
Gets the query corresponding to the sitemap part of the context
|
Query |
getSiteQuery(Site currentSite)
Gets the query corresponding to the site part of the context
|
Query |
getTagQuery()
Gets the query corresponding to the tag part of the context
|
int |
hashCode() |
private SiteContext _sites
private SitemapContext _sitemap
private ContextLang _langs
private boolean _tagAutoposting
public SearchContext(SiteContext sites, SitemapContext sitemap, ContextLang langs, List<String> tags, boolean tagAutoposting)
sites
- The site contextsitemap
- The sitemap contextlangs
- The lang of the contexttags
- The tags of the contexttagAutoposting
- true
if search on tags should be with autopostingpublic Query getSiteQuery(Site currentSite)
currentSite
- the current sitepublic Query getSitemapQuery(Page currentPage)
currentPage
- the current pagepublic SearchContext.ContextLangAndCurrentLang getContextLang(String currentLang)
ContextLang
and the current langcurrentLang
- The current langContextLang
and the current langpublic Query getTagQuery()