Package org.ametys.web.filter
Interface WebContentFilter.FilterSearchContext
- All Known Implementing Classes:
DefaultWebContentFilter.DefaultFilterSearchContext
,EventsFilter.EventFilterSearchContext
- Enclosing interface:
- WebContentFilter
public static interface WebContentFilter.FilterSearchContext
Interface representing a filter search context.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a site to the filtervoid
Add a tag to the filterGet the search contextGet the context languageint
getDepth()
Get the search depthgetFullExpression
(String siteName, String language) Get the Expression.Get the parent page idgetSites()
Get the site names to match contentsgetTags()
Get the tag keys to match contentsboolean
Is the tag auto posting enabled?The tags conditiongetTagsExpression
(String siteName) Get the expression corresponding to the filter's tagsvoid
setContext
(WebContentFilter.Context context) Set the search contextvoid
Set the context languagevoid
setDepth
(int depth) Set the search depthvoid
set the parent page Id.void
setTagsAutoPosting
(boolean enable) Enable/disable the tag autoposting feature.void
setTagsCondition
(ContentFilter.Condition condition) Set the tags condition
-
Method Details
-
getContext
Get the search context- Returns:
- The search context
-
setContext
Set the search context- Parameters:
context
- The search context to set
-
getSites
Get the site names to match contents- Returns:
- The the site names to match contents
-
addSite
Add a site to the filter- Parameters:
siteName
- The site name to add
-
getDepth
int getDepth()Get the search depth- Returns:
- The search depth
-
getPageId
Get the parent page id- Returns:
- The parent page id
-
setDepth
Set the search depth- Parameters:
depth
- The search depth. Set to0
for no depth limitation.
-
getContextLanguage
Get the context language- Returns:
- The context language
-
setContextLanguage
Set the context language- Parameters:
context
- The context language to set
-
getTags
Get the tag keys to match contents- Returns:
- The tag keys to match contents
-
getTagsCondition
The tags condition- Returns:
- The tags condition
-
getTagsAutoPosting
boolean getTagsAutoPosting()Is the tag auto posting enabled?- Returns:
- true if it is
-
addTag
Add a tag to the filter- Parameters:
tag
- The tag key to add
-
setTagsCondition
Set the tags condition- Parameters:
condition
- The condition to set
-
setTagsAutoPosting
Enable/disable the tag autoposting feature.- Parameters:
enable
- True to enable the autposting, false to remains in strict match mode.
-
setPageId
set the parent page Id.- Parameters:
pageId
- Id of the parent page (when fetching child of a page).
-
getFullExpression
Get the Expression.- Parameters:
siteName
- the site namelanguage
- the language- Returns:
- the expression.
-
getTagsExpression
Get the expression corresponding to the filter's tags- Parameters:
siteName
- The current site name- Returns:
- The expression corresponding to the filter's tags
-