Package org.ametys.web.sitemap
Class DefaultSitemapDecoratorsHandler
- java.lang.Object
-
- org.ametys.web.sitemap.DefaultSitemapDecoratorsHandler
-
- All Implemented Interfaces:
SitemapDecoratorsHandler
,Component
,Contextualizable
,Serviceable
public class DefaultSitemapDecoratorsHandler extends Object implements SitemapDecoratorsHandler, Serviceable, Contextualizable, Component
Default implementation ofSitemapDecoratorsHandler
-
-
Field Summary
-
Fields inherited from interface org.ametys.web.sitemap.SitemapDecoratorsHandler
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultSitemapDecoratorsHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_matches(SitemapIcon icon, Page page)
Determines if page matches the decoratorprotected boolean
_matches(SitemapIcon icon, Sitemap sitemap)
Determines if page matches the decoratorvoid
contextualize(Context context)
protected List<SitemapDecorator>
getDecorators(String skinId)
Get the list of available decoratorsList<SitemapDecorator>
getDecorators(Page page)
Get the list of decorators for a given pageList<SitemapDecorator>
getDecorators(Site site)
Get the list of available decoratorsList<SitemapDecorator>
getDecorators(Sitemap sitemap)
Get the list of available decoratorsSitemapIcon
getIcon(Page page)
Get the icon of the pageprotected List<SitemapIcon>
getIcons(String skinId)
Get the list of available iconsList<SitemapIcon>
getIcons(Site site)
Get the list of available iconsvoid
service(ServiceManager manager)
-
-
-
Constructor Detail
-
DefaultSitemapDecoratorsHandler
public DefaultSitemapDecoratorsHandler()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getIcons
public List<SitemapIcon> getIcons(Site site)
Description copied from interface:SitemapDecoratorsHandler
Get the list of available icons- Specified by:
getIcons
in interfaceSitemapDecoratorsHandler
- Parameters:
site
- the site name- Returns:
- the list of available icons
-
getIcons
protected List<SitemapIcon> getIcons(String skinId)
Get the list of available icons- Parameters:
skinId
- name of the skin- Returns:
- the list of available icons
-
getIcon
public SitemapIcon getIcon(Page page)
Description copied from interface:SitemapDecoratorsHandler
Get the icon of the page- Specified by:
getIcon
in interfaceSitemapDecoratorsHandler
- Parameters:
page
- the page- Returns:
- the file icon path
-
getDecorators
public List<SitemapDecorator> getDecorators(Site site)
Description copied from interface:SitemapDecoratorsHandler
Get the list of available decorators- Specified by:
getDecorators
in interfaceSitemapDecoratorsHandler
- Parameters:
site
- the site name- Returns:
- the list of available decorators
-
getDecorators
protected List<SitemapDecorator> getDecorators(String skinId)
Get the list of available decorators- Parameters:
skinId
- name of the skin- Returns:
- the list of available decorators
-
getDecorators
public List<SitemapDecorator> getDecorators(Sitemap sitemap)
Description copied from interface:SitemapDecoratorsHandler
Get the list of available decorators- Specified by:
getDecorators
in interfaceSitemapDecoratorsHandler
- Parameters:
sitemap
- the sitemap- Returns:
- the list of available decorators
-
getDecorators
public List<SitemapDecorator> getDecorators(Page page)
Description copied from interface:SitemapDecoratorsHandler
Get the list of decorators for a given page- Specified by:
getDecorators
in interfaceSitemapDecoratorsHandler
- Parameters:
page
- the page- Returns:
- decorators of page
-
_matches
protected boolean _matches(SitemapIcon icon, Sitemap sitemap)
Determines if page matches the decorator- Parameters:
icon
- the iconsitemap
- the sitemap- Returns:
- true if the page matches the decorator
-
_matches
protected boolean _matches(SitemapIcon icon, Page page)
Determines if page matches the decorator- Parameters:
icon
- the iconpage
- the page to test- Returns:
- true if the page matches the decorator
-
-