public class DefaultSitemapDecoratorsHandler extends Object implements SitemapDecoratorsHandler, Serviceable, Contextualizable, Component
SitemapDecoratorsHandler
Modifier and Type | Field and Description |
---|---|
private Context |
_cocoonContext |
private Context |
_context |
private Map<String,List<SitemapDecorator>> |
_decorators |
private Map<String,List<SitemapIcon>> |
_icons |
protected Map<String,Long> |
_lastConfUpdate
The last time the file was loaded
|
private static Logger |
_logger |
private AmetysObjectResolver |
_resolver |
private RightManager |
_rightManager |
ROLE
Constructor and Description |
---|
DefaultSitemapDecoratorsHandler() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_findAllValuesInMultipleData(String valueToTest,
Object valueFromDataHolder,
ElementType type) |
protected boolean |
_matches(SitemapIcon icon,
Page page)
Determines if page matches the decorator
|
protected 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) |
(package private) boolean |
_matchesOrData(Map<String,String> data,
ModelLessDataHolder dataHolder) |
private boolean |
_matchesOrData(String dataPath,
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) |
void |
contextualize(Context context) |
List<SitemapDecorator> |
getDecorators(Page page)
Get the list of decorators for a given page
|
List<SitemapDecorator> |
getDecorators(Site site)
Get the list of available decorators
|
List<SitemapDecorator> |
getDecorators(Sitemap sitemap)
Get the list of available decorators
|
SitemapIcon |
getIcon(Page page)
Get the icon of the page
|
List<SitemapIcon> |
getIcons(Site site)
Get the list of available icons
|
void |
refreshValues(String skinId)
Refresh the configuration values
|
void |
service(ServiceManager manager) |
protected Map<String,Long> _lastConfUpdate
private Map<String,List<SitemapIcon>> _icons
private Map<String,List<SitemapDecorator>> _decorators
private Context _cocoonContext
private AmetysObjectResolver _resolver
private RightManager _rightManager
public DefaultSitemapDecoratorsHandler()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public List<SitemapIcon> getIcons(Site site)
SitemapDecoratorsHandler
getIcons
in interface SitemapDecoratorsHandler
site
- the site namepublic SitemapIcon getIcon(Page page)
SitemapDecoratorsHandler
getIcon
in interface SitemapDecoratorsHandler
page
- the pagepublic List<SitemapDecorator> getDecorators(Site site)
SitemapDecoratorsHandler
getDecorators
in interface SitemapDecoratorsHandler
site
- the site namepublic List<SitemapDecorator> getDecorators(Sitemap sitemap)
SitemapDecoratorsHandler
getDecorators
in interface SitemapDecoratorsHandler
sitemap
- the sitemappublic List<SitemapDecorator> getDecorators(Page page)
SitemapDecoratorsHandler
getDecorators
in interface SitemapDecoratorsHandler
page
- the pageprotected boolean _matches(SitemapIcon icon, Sitemap sitemap)
icon
- the iconsitemap
- the sitemapprotected boolean _matches(SitemapIcon icon, Page page)
icon
- the iconpage
- the page to testprivate boolean _matchesTags(SitemapIcon icon, Page page)
private boolean _matchesMetadata(SitemapIcon icon, MetadataAwarePagesContainer page)
private boolean _matchesProperties(SitemapIcon icon, PagesContainer page)
private boolean _matchesAndProperties(Map<String,String> properties, PagesContainer page)
private boolean _matchesOrProperties(Map<String,String> properties, PagesContainer page)
boolean _matchesAndData(Map<String,String> data, ModelLessDataHolder dataHolder)
boolean _matchesOrData(Map<String,String> data, ModelLessDataHolder dataHolder)
private boolean _matchesOrData(String dataPath, Map<String,String> data, ModelLessDataHolder dataHolder)
private boolean _findAllValuesInMultipleData(String valueToTest, Object valueFromDataHolder, ElementType type)
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void refreshValues(String skinId)
skinId
- the skin name