Package org.ametys.plugins.blog.posts
Class SetPostFilterInRequestAttributesAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.web.repository.page.actions.SetFilterInRequestAttributesAction
org.ametys.plugins.blog.posts.SetPostFilterInRequestAttributesAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
Set a PostFilter in request attributes.
-
Field Summary
Fields inherited from class org.ametys.web.repository.page.actions.SetFilterInRequestAttributesAction
_contentTypeEP, _filterExtPt, _jsonUtils, _resolver, _serviceEP, _siteManager, _tagProviderEP
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected WebContentFilter
_createFilter
(String id, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP) Create a WebContentFilter.protected WebContentFilter
_getFilterFromParams
(Parameters parameters, ZoneItem zoneItem, Map<String, Object> parentContextAttributes) Get the filter from the action parameters.protected WebContentFilter
_getFilterFromZoneItem
(ZoneItem zoneItem) Get the content filter from a ZoneItem.protected Expression
Get the expression to exclude future postsprotected ContentFilter
_getStaticFilterById
(String filterId, String siteName) Retrieve the content filter with its idprotected boolean
Test if the ZoneItem is valid.Methods inherited from class org.ametys.web.repository.page.actions.SetFilterInRequestAttributesAction
_getFilterFromZoneItem, _getFilterMap, _getFilterMap, _getSortList, _getSortList, _setFilterCriteria, _setSearchContext, _setSearchContext, _setSearchContext, _setSortCriteria, act, service
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
SetPostFilterInRequestAttributesAction
-
-
Method Details
-
_getFilterFromParams
protected WebContentFilter _getFilterFromParams(Parameters parameters, ZoneItem zoneItem, Map<String, Object> parentContextAttributes) Description copied from class:SetFilterInRequestAttributesAction
Get the filter from the action parameters.- Overrides:
_getFilterFromParams
in classSetFilterInRequestAttributesAction
- Parameters:
parameters
- The Action parameters.zoneItem
- the zone itemparentContextAttributes
- The parent context attributes.- Returns:
- the content filter.
-
_getFilterFromZoneItem
Description copied from class:SetFilterInRequestAttributesAction
Get the content filter from a ZoneItem.- Overrides:
_getFilterFromZoneItem
in classSetFilterInRequestAttributesAction
- Parameters:
zoneItem
- the ZoneItem.- Returns:
- the content filter.
- Throws:
ParameterException
- if parameters are invalid
-
_isValid
Description copied from class:SetFilterInRequestAttributesAction
Test if the ZoneItem is valid.- Overrides:
_isValid
in classSetFilterInRequestAttributesAction
- Parameters:
zoneItem
- the ZoneItem.- Returns:
- true if the ZoneItem is valid, false otherwise.
-
_createFilter
protected WebContentFilter _createFilter(String id, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP) Description copied from class:SetFilterInRequestAttributesAction
Create a WebContentFilter.- Overrides:
_createFilter
in classSetFilterInRequestAttributesAction
- Parameters:
id
- the filter ID.resolver
- the AmetysObjectResolver.contentTypeExtensionPoint
- The extension point for content typessiteManager
- The site managertagProviderEP
- The tag provider extension point- Returns:
- the WebContentFilter.
-
_getStaticFilterById
Description copied from class:SetFilterInRequestAttributesAction
Retrieve the content filter with its id- Overrides:
_getStaticFilterById
in classSetFilterInRequestAttributesAction
- Parameters:
filterId
- the id of the filter to retrievesiteName
- The site name- Returns:
- the content filter associated with this id
-
_getNoFuturePostsExpression
Get the expression to exclude future posts- Returns:
- the expression to exclude future posts
-