Package org.ametys.web.filter
Interface WebContentFilter
-
- All Superinterfaces:
ContentFilter
- All Known Implementing Classes:
DefaultWebContentFilter
,EventsFilter
,PostFilter
,StaticWebContentFilter
public interface WebContentFilter extends ContentFilter
This interface represents a filter in a web context
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
WebContentFilter.AccessLimitation
The access limitation policy.static class
WebContentFilter.Context
The search contextstatic interface
WebContentFilter.FilterSearchContext
Interface representing a filter search context.-
Nested classes/interfaces inherited from interface org.ametys.cms.filter.ContentFilter
ContentFilter.Condition, ContentFilter.ContextLanguage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebContentFilter.FilterSearchContext
addSearchContext()
Add a search context.WebContentFilter.AccessLimitation
getAccessLimitation()
Determines the access limitation policy.I18nizableText
getDescription()
Get the filter's descriptionAmetysObjectIterable<Content>
getMatchingContents(String siteName, String lang, Page page)
Get the contents matching this filter.<br/> In most cases, the results will need to be re-filtered by theContentFilterHelper.isContentValid(org.ametys.cms.repository.Content, org.ametys.web.repository.page.Page, org.ametys.cms.filter.ContentFilter)
method.List<WebContentFilter.FilterSearchContext>
getSearchContexts()
Get the list of search contexts.I18nizableText
getTitle()
Get the filter's titleboolean
maskOrphanContents()
Determines if orphan contents must be maskedvoid
setAccessLimitation(WebContentFilter.AccessLimitation limitation)
Set the access limitation policy.void
setDescription(I18nizableText description)
Set the filter's descriptionvoid
setMaskOrphanContents(boolean mask)
Set if orphan contents must be maskedvoid
setTitle(I18nizableText title)
Set the filter's title-
Methods inherited from interface org.ametys.cms.filter.ContentFilter
addContentType, addMetadata, addSortCriteria, getAdditionalFilterExpression, getContentTypes, getContextLanguage, getId, getLength, getMatchingContents, getMatchingContents, getMetadataCondition, getMetadataValues, getSortCriteria, getView, setAdditionalFilterExpression, setContextLanguage, setId, setLength, setMetadataCondition, setResolver, setView
-
-
-
-
Method Detail
-
getTitle
I18nizableText getTitle()
Get the filter's title- Returns:
- The filter's title
-
getDescription
I18nizableText getDescription()
Get the filter's description- Returns:
- the filter's description
-
setTitle
void setTitle(I18nizableText title)
Set the filter's title- Parameters:
title
- The title to set
-
setDescription
void setDescription(I18nizableText description)
Set the filter's description- Parameters:
description
- The description to set
-
getSearchContexts
List<WebContentFilter.FilterSearchContext> getSearchContexts()
Get the list of search contexts.- Returns:
- the list of search contexts.
-
addSearchContext
WebContentFilter.FilterSearchContext addSearchContext()
Add a search context.- Returns:
- the created search context.
-
setMaskOrphanContents
void setMaskOrphanContents(boolean mask)
Set if orphan contents must be masked- Parameters:
mask
- true to mask orphan contents
-
maskOrphanContents
boolean maskOrphanContents()
Determines if orphan contents must be masked- Returns:
- true if orphan contents must be masked
-
getAccessLimitation
WebContentFilter.AccessLimitation getAccessLimitation()
Determines the access limitation policy.- Returns:
- the access limitation policy.
-
setAccessLimitation
void setAccessLimitation(WebContentFilter.AccessLimitation limitation)
Set the access limitation policy.- Parameters:
limitation
- the access limitation policy to set.
-
getMatchingContents
AmetysObjectIterable<Content> getMatchingContents(String siteName, String lang, Page page)
Get the contents matching this filter.<br/> In most cases, the results will need to be re-filtered by theContentFilterHelper.isContentValid(org.ametys.cms.repository.Content, org.ametys.web.repository.page.Page, org.ametys.cms.filter.ContentFilter)
method.- Parameters:
siteName
- The current site name. Can be null.lang
- The current language. Can be null.page
- The current page. Can be null.- Returns:
- The matching contents.
- See Also:
ContentFilterHelper.isContentValid(Content, Page, ContentFilter)
-
-