Package org.ametys.web.cache
Class PageHelper
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.web.cache.PageHelper
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class PageHelper extends AbstractLogEnabled implements Component, Serviceable
Helper component providing status of pages.
-
-
Field Summary
Fields Modifier and Type Field Description private InputDataExtensionPoint
_inputDataExtensionPoint
private RightManager
_rightManager
private ServiceExtensionPoint
_serviceExtPt
static String
ROLE
The component role.
-
Constructor Summary
Constructors Constructor Description PageHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Content>
getAllContents(Page page)
Get all the contents inside a pageboolean
isCacheable(Page page)
Tests if a page is cacheable, i.e: its access is not restricted all its page elements are cachableboolean
isCaptchaRequired(Page page)
Determines if a captcha is required on forms of the pagevoid
service(ServiceManager serviceManager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_serviceExtPt
private ServiceExtensionPoint _serviceExtPt
-
_rightManager
private RightManager _rightManager
-
_inputDataExtensionPoint
private InputDataExtensionPoint _inputDataExtensionPoint
-
-
Constructor Detail
-
PageHelper
public PageHelper()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
isCacheable
public boolean isCacheable(Page page)
Tests if a page is cacheable, i.e:- its access is not restricted
- all its page elements are cachable
- Parameters:
page
- The page to test.- Returns:
- true if the page is cachable, false otherwise.
-
isCaptchaRequired
public boolean isCaptchaRequired(Page page)
Determines if a captcha is required on forms of the page- Parameters:
page
- The page to test- Returns:
- true if a captcha is required
-
getAllContents
public List<Content> getAllContents(Page page)
Get all the contents inside a page- Parameters:
page
- page to search- Returns:
- list of contents in this page
-
-