Package org.ametys.web.filter
Class PageFilterHelper
- java.lang.Object
-
- org.ametys.web.filter.PageFilterHelper
-
- All Implemented Interfaces:
Component
,Serviceable
public class PageFilterHelper extends Object implements Component, Serviceable
Component helper for manipulatingContentFilter
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider
_currentUserProvider
The current user providerprotected RenderingContextHandler
_renderingContextHandler
The rendering context handler.protected RightManager
_rightManager
The right managerstatic String
ROLE
The Avalon Role
-
Constructor Summary
Constructors Constructor Description PageFilterHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isPageAccessible(Page page)
Test the page accessible by the current user.void
saxMatchingPages(ContentHandler handler, PageFilter filter, String siteName, String lang, Page currentPage)
SAX all pages matching the given filtervoid
saxPage(ContentHandler handler, Page page)
SAX a page in its specific viewvoid
service(ServiceManager manager)
-
-
-
Field Detail
-
_rightManager
protected RightManager _rightManager
The right manager
-
_renderingContextHandler
protected RenderingContextHandler _renderingContextHandler
The rendering context handler.
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
-
Constructor Detail
-
PageFilterHelper
public PageFilterHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
saxMatchingPages
public void saxMatchingPages(ContentHandler handler, PageFilter filter, String siteName, String lang, Page currentPage) throws SAXException, IOException
SAX all pages matching the given filter- Parameters:
handler
- The content handler to SAX intofilter
- The filtersiteName
- The current site name. Can be null.lang
- The current language. Can be null.currentPage
- The current page. Can be null.- Throws:
SAXException
- If an error occurs while SAXingIOException
- If an error occurs while retrieving content.
-
isPageAccessible
protected boolean isPageAccessible(Page page)
Test the page accessible by the current user.- Parameters:
page
- the page- Returns:
- true if the page is accessible, false otherwise.
-
saxPage
public void saxPage(ContentHandler handler, Page page) throws SAXException, IOException
SAX a page in its specific view- Parameters:
handler
- The content handler to SAX intopage
- The page to SAX- Throws:
SAXException
- If an error occurs while SAXingIOException
- If an error occurs while retrieving content.
-
-