Package org.ametys.web.filter
Interface WebContentFilter
- All Superinterfaces:
ContentFilter
- All Known Implementing Classes:
DefaultWebContentFilter
,EventsFilter
,PostFilter
,StaticWebContentFilter
This interface represents a filter in a web context
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The access limitation policy.static enum
The search contextstatic interface
Interface representing a filter search context.Nested classes/interfaces inherited from interface org.ametys.cms.filter.ContentFilter
ContentFilter.Condition, ContentFilter.ContextLanguage
-
Method Summary
Modifier and TypeMethodDescriptionAdd a search context.Determines the access limitation policy.Get the filter's descriptiongetMatchingContents
(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.Get the list of search contexts.getTitle()
Get the filter's titleboolean
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 titleMethods 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 Details
-
getTitle
Get the filter's title- Returns:
- The filter's title
-
getDescription
Get the filter's description- Returns:
- the filter's description
-
setTitle
Set the filter's title- Parameters:
title
- The title to set
-
setDescription
Set the filter's description- Parameters:
description
- The description to set
-
getSearchContexts
Get the list of search contexts.- Returns:
- the list of search contexts.
-
addSearchContext
Add a search context.- Returns:
- the created search context.
-
setMaskOrphanContents
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
Determines the access limitation policy.- Returns:
- the access limitation policy.
-
setAccessLimitation
Set the access limitation policy.- Parameters:
limitation
- the access limitation policy to set.
-
getMatchingContents
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:
-