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
public class SetPostFilterInRequestAttributesAction extends SetFilterInRequestAttributesAction
Set a PostFilter in request attributes.
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__POST_METADATA_DATE
-
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
Constructors Constructor Description SetPostFilterInRequestAttributesAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WebContentFilter
_createFilter(String id, AmetysObjectResolver resolver, ContentTypeExtensionPoint contentTypeExtensionPoint, SiteManager siteManager, TagProviderExtensionPoint tagProviderEP)
Create a WebContentFilter.private boolean
_getDisplayFuturePosts(String siteName)
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
_getNoFuturePostsExpression()
Get the expression to exclude future postsprotected ContentFilter
_getStaticFilterById(String filterId, String siteName)
Retrieve the content filter with its idprotected boolean
_isValid(ZoneItem zoneItem)
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
-
-
-
-
Field Detail
-
__POST_METADATA_DATE
private static final String __POST_METADATA_DATE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SetPostFilterInRequestAttributesAction
public SetPostFilterInRequestAttributesAction()
-
-
Method Detail
-
_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
protected WebContentFilter _getFilterFromZoneItem(ZoneItem zoneItem) throws ParameterException
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
protected boolean _isValid(ZoneItem zoneItem)
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
protected ContentFilter _getStaticFilterById(String filterId, String siteName)
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
protected Expression _getNoFuturePostsExpression()
Get the expression to exclude future posts- Returns:
- the expression to exclude future posts
-
_getDisplayFuturePosts
private boolean _getDisplayFuturePosts(String siteName)
-
-