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.
-
-
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 cacheableboolean
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
-
-
-
-
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 cacheable
- Parameters:
page
- The page to test.- Returns:
- true if the page is cacheable, 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
-
-