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 void
addSite(String siteName)
Add a site to the filtervoid
addTag(String tag)
Add a tag to the filterWebContentFilter.Context
getContext()
Get the search contextContentFilter.ContextLanguage
getContextLanguage()
Get the context languageint
getDepth()
Get the search depthExpression
getFullExpression(String siteName, String language)
Get the Expression.String
getPageId()
Get the parent page idList<String>
getSites()
Get the site names to match contentsList<String>
getTags()
Get the tag keys to match contentsboolean
getTagsAutoPosting()
Is the tag auto posting enabled?ContentFilter.Condition
getTagsCondition()
The tags conditionExpression
getTagsExpression(String siteName)
Get the expression corresponding to the filter's tagsvoid
setContext(WebContentFilter.Context context)
Set the search contextvoid
setContextLanguage(ContentFilter.ContextLanguage context)
Set the context languagevoid
setDepth(int depth)
Set the search depthvoid
setPageId(String pageId)
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 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 to0
for 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
-
-