Package org.ametys.web.sitemap
Class SkinSitemapIcons
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.sitemap.SkinSitemapIcons
-
- All Implemented Interfaces:
FileReloader
,LogEnabled
,SitemapIcons
,Initializable
,Serviceable
public class SkinSitemapIcons extends AbstractLogEnabled implements SitemapIcons, Initializable, Serviceable, FileReloader
Implementation ofSitemapIcons
for icons provided by skins
-
-
Field Summary
Fields Modifier and Type Field Description protected SkinsManager
_skinsManager
The skins managerprotected SourceResolver
_srcResolver
The source resolver
-
Constructor Summary
Constructors Constructor Description SkinSitemapIcons()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_createCaches()
Creates the cachesSet<SitemapIcon>
getIcons(String skinName)
Get the list of available iconsString
getId(String sourceUrl)
Get an unique ID for this File Reloadervoid
initialize()
void
service(ServiceManager smanager)
void
updateFile(String sourceUrl, Source source, InputStream is)
Update the file, the sourceUrl is only there if you manage multiple files, the Configuration object is already present to read it-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_skinsManager
protected SkinsManager _skinsManager
The skins manager
-
_srcResolver
protected SourceResolver _srcResolver
The source resolver
-
-
Constructor Detail
-
SkinSitemapIcons
public SkinSitemapIcons()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
_createCaches
protected void _createCaches()
Creates the caches
-
getIcons
public Set<SitemapIcon> getIcons(String skinName)
Description copied from interface:SitemapIcons
Get the list of available icons- Specified by:
getIcons
in interfaceSitemapIcons
- Parameters:
skinName
- name of the skin- Returns:
- the list of available icons
-
updateFile
public void updateFile(String sourceUrl, Source source, InputStream is) throws Exception
Description copied from interface:FileReloader
Update the file, the sourceUrl is only there if you manage multiple files, the Configuration object is already present to read it- Specified by:
updateFile
in interfaceFileReloader
- Parameters:
sourceUrl
- the url of the file.source
- the source to read, can be null if no file was readis
- the input stream to read, can be null if no file was read- Throws:
Exception
- something went wrong while reading the inputstream
-
getId
public String getId(String sourceUrl)
Description copied from interface:FileReloader
Get an unique ID for this File Reloader- Specified by:
getId
in interfaceFileReloader
- Parameters:
sourceUrl
- this is passed as an argument if your class read multiple files. If it reads only one file, the full class name can be a good enough ID- Returns:
- an unique ID
-
-