Class EventsFilter
- java.lang.Object
-
- org.ametys.cms.filter.DefaultContentFilter
-
- org.ametys.web.filter.DefaultWebContentFilter
-
- org.ametys.web.filter.StaticWebContentFilter
-
- org.ametys.plugins.calendar.events.EventsFilter
-
- All Implemented Interfaces:
ContentFilter
,PluginAware
,WebContentFilter
,Configurable
,Serviceable
public class EventsFilter extends StaticWebContentFilter
Content filter which allows to directly provide: - a custom metadata expression to filter the contents - a list of tags to match of only one is required for the content to match ("OR" tags).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
EventsFilter.EventFilterSearchContext
FilterSearchContext specific to the events 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 Expression
_metadataExpression
The metadata expression.-
Fields inherited from class org.ametys.web.filter.StaticWebContentFilter
_featureName, _pluginName
-
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 EventsFilter()
Build an events filter.EventsFilter(String id, EventsFilter originalFilter, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP)
Build a events filter from copy a anotherEventsFilter(String id, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP)
Build an events filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearSearchContexts()
Clear the search contextsWebContentFilter.FilterSearchContext
createSeachContext()
Create a search context.Expression
getMetadataExpression()
Get the expression corresponding to the filter's tagsvoid
setMetadataExpression(Expression expression)
Set the metadata expression.-
Methods inherited from class org.ametys.web.filter.StaticWebContentFilter
_configureComplexMetadata, _configureContentTypes, _configureContext, _configureContextLanguage, _configureDepth, _configureDescription, _configureMetadata, _configureSearchContexts, _configureSortCriteria, _configureTitle, _getComplexDateExpression, configure, service, setPluginInfo
-
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, 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
-
_metadataExpression
protected Expression _metadataExpression
The metadata expression.
-
-
Constructor Detail
-
EventsFilter
public EventsFilter()
Build an events filter.
-
EventsFilter
public EventsFilter(String id, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP)
Build an events filter.- Parameters:
id
- The filter idresolver
- The ametys object resolvercontentTypeExtensionPoint
- The extension point for content typessiteManager
- The site managertagProviderEP
- The tag provider
-
EventsFilter
public EventsFilter(String id, EventsFilter originalFilter, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP)
Build a events filter from copy a another- Parameters:
id
- The filter idoriginalFilter
- The filter to copyresolver
- The ametys object resolvercontentTypeExtensionPoint
- The extension point for content typessiteManager
- The site managertagProviderEP
- The tag provider
-
-
Method Detail
-
setMetadataExpression
public void setMetadataExpression(Expression expression)
Set the metadata expression.- Parameters:
expression
- the metadata expression.
-
getMetadataExpression
public Expression getMetadataExpression()
Description copied from class:DefaultContentFilter
Get the expression corresponding to the filter's tags- Overrides:
getMetadataExpression
in classDefaultContentFilter
- Returns:
- The expression corresponding to the filter's tags
-
createSeachContext
public WebContentFilter.FilterSearchContext createSeachContext()
Description copied from class:DefaultWebContentFilter
Create a search context.- Overrides:
createSeachContext
in classDefaultWebContentFilter
- Returns:
- the created search context.
-
clearSearchContexts
public void clearSearchContexts()
Clear the search contexts
-
-