Package org.ametys.plugins.blog.posts
Class PostFilter
- java.lang.Object
-
- org.ametys.cms.filter.DefaultContentFilter
-
- org.ametys.web.filter.DefaultWebContentFilter
-
- org.ametys.plugins.blog.posts.PostFilter
-
- All Implemented Interfaces:
ContentFilter
,WebContentFilter
public class PostFilter extends DefaultWebContentFilter
Post filter: able to search posts in blog sites.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
PostFilter.PostFilterSearchContext
FilterSearchContext specific to the post filter.-
Nested classes/interfaces inherited from class org.ametys.web.filter.DefaultWebContentFilter
DefaultWebContentFilter.ContentComparator, DefaultWebContentFilter.DefaultFilterSearchContext
-
Nested classes/interfaces inherited from interface org.ametys.cms.filter.ContentFilter
ContentFilter.Condition, ContentFilter.ContextLanguage
-
Nested classes/interfaces inherited from interface org.ametys.web.filter.WebContentFilter
WebContentFilter.AccessLimitation, WebContentFilter.Context, WebContentFilter.FilterSearchContext
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_site
The site name or blank to search in all sites.static String
BLOG_SITE_TYPE
The blog site type.-
Fields inherited from class org.ametys.web.filter.DefaultWebContentFilter
_accessLimitation, _description, _logger, _maskOrphan, _searchContexts, _siteManager, _tagProviderEP, _title
-
Fields inherited from class org.ametys.cms.filter.DefaultContentFilter
_additionalFilterExpression, _contentTypeEP, _contentTypes, _contextLang, _id, _length, _metadata, _metadataCondition, _resolver, _sortCriteria, _srcResolver, _viewName
-
-
Constructor Summary
Constructors Constructor Description PostFilter()
Create a new filter.PostFilter(String id, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP)
Create a new filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebContentFilter.FilterSearchContext
createSeachContext()
Create a search context.String
getSite()
Get the site name.void
setSite(String site)
Set the site name.-
Methods inherited from class org.ametys.web.filter.DefaultWebContentFilter
addMetadata, addSearchContext, getAccessLimitation, getContextLanguage, getDescription, getFilterExpression, getMatchingContents, getMatchingContents, getSearchContexts, getTitle, getXPathQuery, getXPathQuery, maskOrphanContents, setAccessLimitation, setContextLanguage, setDescription, setMaskOrphanContents, setTitle
-
Methods inherited from class org.ametys.cms.filter.DefaultContentFilter
addContentType, addSortCriteria, getAdditionalFilterExpression, getContentTypes, getContentTypesExpression, getContextLanguagesExpression, getFilterExpression, getId, getLength, getMatchingContents, getMatchingContents, getMetadataCondition, getMetadataExpression, getMetadataValues, getSortCriteria, getView, getXPathQuery, getXPathQuery, setAdditionalFilterExpression, setId, setLength, setMetadataCondition, setResolver, setView
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.filter.ContentFilter
addContentType, addSortCriteria, getAdditionalFilterExpression, getContentTypes, getId, getLength, getMatchingContents, getMatchingContents, getMetadataCondition, getMetadataValues, getSortCriteria, getView, setAdditionalFilterExpression, setId, setLength, setMetadataCondition, setResolver, setView
-
-
-
-
Field Detail
-
BLOG_SITE_TYPE
public static final String BLOG_SITE_TYPE
The blog site type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PostFilter
public PostFilter()
Create a new filter.
-
PostFilter
public PostFilter(String id, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP)
Create a new filter.- Parameters:
id
- The filter unique identifierresolver
- The ametys object resolvercontentTypeExtensionPoint
- The extension point for content typessiteManager
- the site manager.tagProviderEP
- The tag provider extension point
-
-
Method Detail
-
getSite
public String getSite()
Get the site name.- Returns:
- the site name or blank to search in all sites.
-
setSite
public void setSite(String site)
Set the site name.- Parameters:
site
- the site name or blank to search in all sites.
-
createSeachContext
public WebContentFilter.FilterSearchContext createSeachContext()
Description copied from class:DefaultWebContentFilter
Create a search context.- Overrides:
createSeachContext
in classDefaultWebContentFilter
- Returns:
- the created search context.
-
-