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 Modifier and Type Field Description private AmetysObjectResolver_ametysResolverprivate Context_contextprivate Map<String,List<SitemapDecorator>>_decoratorsprivate Map<String,List<SitemapIcon>>_iconsprotected Map<String,Long>_lastConfUpdateThe last time the file was loadedprivate static org.slf4j.Logger_loggerprivate RightManager_rightManagerprivate SourceResolver_sourceResolver-
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 private boolean_findAllValuesInMultipleData(String valueToTest, Object valueFromDataHolder, ElementType type)protected boolean_matches(SitemapIcon icon, Page page)Determines if page matches the decoratorprotected boolean_matches(SitemapIcon icon, Sitemap sitemap)Determines if page matches the decorator(package private) boolean_matchesAndData(Map<String,String> data, ModelLessDataHolder dataHolder)private boolean_matchesAndProperties(Map<String,String> properties, PagesContainer page)private boolean_matchesMetadata(SitemapIcon icon, MetadataAwarePagesContainer page)private boolean_matchesOrData(String dataPath, Map<String,String> data, ModelLessDataHolder dataHolder)(package private) boolean_matchesOrData(Map<String,String> data, ModelLessDataHolder dataHolder)private boolean_matchesOrProperties(Map<String,String> properties, PagesContainer page)private boolean_matchesProperties(SitemapIcon icon, PagesContainer page)private boolean_matchesTags(SitemapIcon icon, Page page)voidcontextualize(Context context)List<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 decoratorsSitemapIcongetIcon(Page page)Get the icon of the pageList<SitemapIcon>getIcons(Site site)Get the list of available iconsvoidrefreshValues(String skinId)Refresh the configuration valuesvoidservice(ServiceManager manager)
-
-
-
Field Detail
-
_logger
private static org.slf4j.Logger _logger
-
_lastConfUpdate
protected Map<String,Long> _lastConfUpdate
The last time the file was loaded
-
_icons
private Map<String,List<SitemapIcon>> _icons
-
_decorators
private Map<String,List<SitemapDecorator>> _decorators
-
_ametysResolver
private AmetysObjectResolver _ametysResolver
-
_sourceResolver
private SourceResolver _sourceResolver
-
_rightManager
private RightManager _rightManager
-
-
Constructor Detail
-
DefaultSitemapDecoratorsHandler
public DefaultSitemapDecoratorsHandler()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
getIcons
public List<SitemapIcon> getIcons(Site site)
Description copied from interface:SitemapDecoratorsHandlerGet the list of available icons- Specified by:
getIconsin interfaceSitemapDecoratorsHandler- Parameters:
site- the site name- Returns:
- the list of available icons
-
getIcon
public SitemapIcon getIcon(Page page)
Description copied from interface:SitemapDecoratorsHandlerGet the icon of the page- Specified by:
getIconin interfaceSitemapDecoratorsHandler- Parameters:
page- the page- Returns:
- the file icon path
-
getDecorators
public List<SitemapDecorator> getDecorators(Site site)
Description copied from interface:SitemapDecoratorsHandlerGet the list of available decorators- Specified by:
getDecoratorsin interfaceSitemapDecoratorsHandler- Parameters:
site- the site name- Returns:
- the list of available decorators
-
getDecorators
public List<SitemapDecorator> getDecorators(Sitemap sitemap)
Description copied from interface:SitemapDecoratorsHandlerGet the list of available decorators- Specified by:
getDecoratorsin interfaceSitemapDecoratorsHandler- Parameters:
sitemap- the sitemap- Returns:
- the list of available decorators
-
getDecorators
public List<SitemapDecorator> getDecorators(Page page)
Description copied from interface:SitemapDecoratorsHandlerGet the list of decorators for a given page- Specified by:
getDecoratorsin 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
-
_matchesTags
private boolean _matchesTags(SitemapIcon icon, Page page)
-
_matchesMetadata
private boolean _matchesMetadata(SitemapIcon icon, MetadataAwarePagesContainer page)
-
_matchesProperties
private boolean _matchesProperties(SitemapIcon icon, PagesContainer page)
-
_matchesAndProperties
private boolean _matchesAndProperties(Map<String,String> properties, PagesContainer page)
-
_matchesOrProperties
private boolean _matchesOrProperties(Map<String,String> properties, PagesContainer page)
-
_matchesAndData
boolean _matchesAndData(Map<String,String> data, ModelLessDataHolder dataHolder)
-
_matchesOrData
boolean _matchesOrData(Map<String,String> data, ModelLessDataHolder dataHolder)
-
_matchesOrData
private boolean _matchesOrData(String dataPath, Map<String,String> data, ModelLessDataHolder dataHolder)
-
_findAllValuesInMultipleData
private boolean _findAllValuesInMultipleData(String valueToTest, Object valueFromDataHolder, ElementType type)
-
refreshValues
public void refreshValues(String skinId)
Refresh the configuration values- Parameters:
skinId- the skin name
-
-