Package org.ametys.web.filter
Class PageFilterHelper
java.lang.Object
org.ametys.web.filter.PageFilterHelper
- All Implemented Interfaces:
Component
,Serviceable
Component helper for manipulating
ContentFilter
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected RenderingContextHandler
The rendering context handler.protected RightManager
The right managerstatic final String
The Avalon Role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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 Details
-
ROLE
The Avalon Role -
_rightManager
The right manager -
_renderingContextHandler
The rendering context handler. -
_currentUserProvider
The current user provider
-
-
Constructor Details
-
PageFilterHelper
public PageFilterHelper()
-
-
Method Details
-
service
- 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
Test the page accessible by the current user.- Parameters:
page
- the page- Returns:
- true if the page is accessible, false otherwise.
-
saxPage
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.
-