Package org.ametys.web.glyph
Class SkinGlyphSourceManager
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.glyph.SkinGlyphSourceManager
-
- All Implemented Interfaces:
LogEnabled,Component,Contextualizable,Serviceable
public class SkinGlyphSourceManager extends AbstractLogEnabled implements Serviceable, Component, Contextualizable
Manager for skin glyph sources
-
-
Field Summary
Fields Modifier and Type Field Description private static Pattern__PLUGIN_SOURCE_URI_PATTERNprivate static Pattern__SKIN_SOURCE_URI_PATTERNprivate Context_contextprivate Map<String,List<String>>_cssFilesprivate CssFontHelper_cssFontHelperprivate long_lastUpdateprivate SourceResolver_resolverprivate SiteManager_siteManagerprivate SkinConfigurationHelper_skinConfigurationHelperprivate SkinsManager_skinsManagerstatic StringROLEThe Avalon Role
-
Constructor Summary
Constructors Constructor Description SkinGlyphSourceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private List<String>_getCssFileURIs(String skinName)Get the URI of CSS files listed in conf/fonts.xml filevoidcontextualize(Context context)Map<String,Object>getCSSFiles(String siteName)Get the CSS files with 'font-face' rule in the skinList<String>getCssUrisWithFontFace(String skinName)Get the URI of CSS files with the 'font-face' ruleSet<String>getGlyphs(String skinName)Get the CSS class names for glyphes contained in the skinList<Map<String,String>>getGlyphsStore(String skinName)Get the glyphs provided by the skinbooleanhasGlyphs(String siteName)Determines if the skin has available glyphesIdevoidservice(ServiceManager smanager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
__SKIN_SOURCE_URI_PATTERN
private static final Pattern __SKIN_SOURCE_URI_PATTERN
-
__PLUGIN_SOURCE_URI_PATTERN
private static final Pattern __PLUGIN_SOURCE_URI_PATTERN
-
_cssFontHelper
private CssFontHelper _cssFontHelper
-
_resolver
private SourceResolver _resolver
-
_siteManager
private SiteManager _siteManager
-
_lastUpdate
private long _lastUpdate
-
_skinConfigurationHelper
private SkinConfigurationHelper _skinConfigurationHelper
-
_skinsManager
private SkinsManager _skinsManager
-
-
Constructor Detail
-
SkinGlyphSourceManager
public SkinGlyphSourceManager()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
hasGlyphs
public boolean hasGlyphs(String siteName) throws Exception
Determines if the skin has available glyphesIde- Parameters:
siteName- The site name- Returns:
- true if the skin has available glyphes
- Throws:
Exception- if failed to read skin files
-
getGlyphsStore
public List<Map<String,String>> getGlyphsStore(String skinName) throws Exception
Get the glyphs provided by the skin- Parameters:
skinName- The skin name- Returns:
- The CSS class names for glyphs
- Throws:
Exception- if failed to read skin files
-
getGlyphs
public Set<String> getGlyphs(String skinName) throws Exception
Get the CSS class names for glyphes contained in the skin- Parameters:
skinName- The skin name- Returns:
- The CSS class names for glyphes
- Throws:
Exception- if failed to read skin files
-
getCSSFiles
public Map<String,Object> getCSSFiles(String siteName) throws Exception
Get the CSS files with 'font-face' rule in the skin- Parameters:
siteName- The site name- Returns:
- The CSS files with font
- Throws:
Exception- If failed to get the list of CSS files with 'font-face' rule
-
getCssUrisWithFontFace
public List<String> getCssUrisWithFontFace(String skinName) throws Exception
Get the URI of CSS files with the 'font-face' rule- Parameters:
skinName- The skin name- Returns:
- the URI of CSS files with the 'font-face' rule
- Throws:
Exception- if fails to read conf/glyph.xml file
-
-