Package org.ametys.web.filter
Interface WebContentFilter.FilterSearchContext
-
- All Known Implementing Classes:
DefaultWebContentFilter.DefaultFilterSearchContext,EventsFilter.EventFilterSearchContext,PostFilter.PostFilterSearchContext
- Enclosing interface:
- WebContentFilter
public static interface WebContentFilter.FilterSearchContext
Interface representing a filter search context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSite(String siteName)Add a site to the filtervoidaddTag(String tag)Add a tag to the filterWebContentFilter.ContextgetContext()Get the search contextContentFilter.ContextLanguagegetContextLanguage()Get the context languageintgetDepth()Get the search depthExpressiongetFullExpression(String siteName, String language)Get the Expression.StringgetPageId()Get the parent page idList<String>getSites()Get the site names to match contentsList<String>getTags()Get the tag keys to match contentsbooleangetTagsAutoPosting()Is the tag auto posting enabled?ContentFilter.ConditiongetTagsCondition()The tags conditionExpressiongetTagsExpression(String siteName)Get the expression corresponding to the filter's tagsvoidsetContext(WebContentFilter.Context context)Set the search contextvoidsetContextLanguage(ContentFilter.ContextLanguage context)Set the context languagevoidsetDepth(int depth)Set the search depthvoidsetPageId(String pageId)set the parent page Id.voidsetTagsAutoPosting(boolean enable)Enable/disable the tag autoposting feature.voidsetTagsCondition(ContentFilter.Condition condition)Set the tags condition
-
-
-
Method Detail
-
getContext
WebContentFilter.Context getContext()
Get the search context- Returns:
- The search context
-
setContext
void setContext(WebContentFilter.Context context)
Set the search context- Parameters:
context- The search context to set
-
getSites
List<String> getSites()
Get the site names to match contents- Returns:
- The the site names to match contents
-
addSite
void addSite(String siteName)
Add a site to the filter- Parameters:
siteName- The site name to add
-
getDepth
int getDepth()
Get the search depth- Returns:
- The search depth
-
setDepth
void setDepth(int depth)
Set the search depth- Parameters:
depth- The search depth. Set to0for no depth limitation.
-
getContextLanguage
ContentFilter.ContextLanguage getContextLanguage()
Get the context language- Returns:
- The context language
-
setContextLanguage
void setContextLanguage(ContentFilter.ContextLanguage context)
Set the context language- Parameters:
context- The context language to set
-
getTags
List<String> getTags()
Get the tag keys to match contents- Returns:
- The tag keys to match contents
-
getTagsCondition
ContentFilter.Condition getTagsCondition()
The tags condition- Returns:
- The tags condition
-
getTagsAutoPosting
boolean getTagsAutoPosting()
Is the tag auto posting enabled?- Returns:
- true if it is
-
setTagsCondition
void setTagsCondition(ContentFilter.Condition condition)
Set the tags condition- Parameters:
condition- The condition to set
-
setTagsAutoPosting
void setTagsAutoPosting(boolean enable)
Enable/disable the tag autoposting feature.- Parameters:
enable- True to enable the autposting, false to remains in strict match mode.
-
setPageId
void setPageId(String pageId)
set the parent page Id.- Parameters:
pageId- Id of the parent page (when fetching child of a page).
-
getFullExpression
Expression getFullExpression(String siteName, String language)
Get the Expression.- Parameters:
siteName- the site namelanguage- the language- Returns:
- the expression.
-
getTagsExpression
Expression getTagsExpression(String siteName)
Get the expression corresponding to the filter's tags- Parameters:
siteName- The current site name- Returns:
- The expression corresponding to the filter's tags
-
-