Class WorkspacesQueryAdapterFOSearch
- java.lang.Object
-
- org.ametys.plugins.workspaces.search.query.WorkspacesQueryAdapterFOSearch
-
- All Implemented Interfaces:
QueryAdapterFOSearch
public class WorkspacesQueryAdapterFOSearch extends Object implements QueryAdapterFOSearch
The query adapter to handle the "with workspaces" FO search service parameter
-
-
Field Summary
-
Fields inherited from interface org.ametys.web.frontoffice.QueryAdapterFOSearch
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description WorkspacesQueryAdapterFOSearch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
_withWorkspaces(Request request)
void
addDocumentType(List<String> documentTypes)
Add document typeint
getPriority()
Retrieves the priority to modify the query.
This can be used to process a query modification before an other.Query
modifyQuery(Query query, Request request, Collection<String> siteNames, String language)
Modify the FO search query.Set<FrontOfficeSearcherFactory.QueryFacet>
modifyQueryFacets(Set<FrontOfficeSearcherFactory.QueryFacet> queryFacets, Request request)
Modify the query facetsQuery
modifySitemapQueryFilter(Query sitemapQuery, Request request, Collection<String> siteNames, String language)
Modify the sitemap query.Query
modifySiteQueryFilter(Query siteQuery, Request request, Collection<String> siteNames, String language)
Modify the site query.
-
-
-
Constructor Detail
-
WorkspacesQueryAdapterFOSearch
public WorkspacesQueryAdapterFOSearch()
-
-
Method Detail
-
getPriority
public int getPriority()
Description copied from interface:QueryAdapterFOSearch
Retrieves the priority to modify the query.
This can be used to process a query modification before an other.- Specified by:
getPriority
in interfaceQueryAdapterFOSearch
- Returns:
- the priority where 0 the max priority and Integer.MAX_VALUE the min priority.
-
modifyQuery
public Query modifyQuery(Query query, Request request, Collection<String> siteNames, String language)
Description copied from interface:QueryAdapterFOSearch
Modify the FO search query.- Specified by:
modifyQuery
in interfaceQueryAdapterFOSearch
- Parameters:
query
- the initial queryrequest
- The requestsiteNames
- The site names.language
- The language- Returns:
- the new modify query
-
modifySiteQueryFilter
public Query modifySiteQueryFilter(Query siteQuery, Request request, Collection<String> siteNames, String language)
Description copied from interface:QueryAdapterFOSearch
Modify the site query.- Specified by:
modifySiteQueryFilter
in interfaceQueryAdapterFOSearch
- Parameters:
siteQuery
- the initial site queryrequest
- The requestsiteNames
- The site names.language
- The language- Returns:
- the new modify site query
-
modifySitemapQueryFilter
public Query modifySitemapQueryFilter(Query sitemapQuery, Request request, Collection<String> siteNames, String language)
Description copied from interface:QueryAdapterFOSearch
Modify the sitemap query.- Specified by:
modifySitemapQueryFilter
in interfaceQueryAdapterFOSearch
- Parameters:
sitemapQuery
- the initial sitemap queryrequest
- The requestsiteNames
- The site names.language
- The language- Returns:
- the new modify site query
-
modifyQueryFacets
public Set<FrontOfficeSearcherFactory.QueryFacet> modifyQueryFacets(Set<FrontOfficeSearcherFactory.QueryFacet> queryFacets, Request request)
Description copied from interface:QueryAdapterFOSearch
Modify the query facets- Specified by:
modifyQueryFacets
in interfaceQueryAdapterFOSearch
- Parameters:
queryFacets
- the initial query facetsrequest
- the request- Returns:
- the new query facets
-
addDocumentType
public void addDocumentType(List<String> documentTypes)
Description copied from interface:QueryAdapterFOSearch
Add document type- Specified by:
addDocumentType
in interfaceQueryAdapterFOSearch
- Parameters:
documentTypes
- the document types
-
_withWorkspaces
private boolean _withWorkspaces(Request request)
-
-