public class SkinGlyphSourceManager extends AbstractLogEnabled implements Serviceable, Component, Contextualizable
| Modifier and Type | Field and Description |
|---|---|
private static Pattern |
__CSS_CLASS_NAME
Pattern for CSS class
|
private Context |
_context |
private Map<String,List<String>> |
_cssFiles |
private Map<String,Set<String>> |
_glyphes |
private Map<String,Long> |
_lastUpdates |
private SourceResolver |
_resolver |
private SiteManager |
_siteManager |
static String |
ROLE
The Avalon Role
|
| Constructor and Description |
|---|
SkinGlyphSourceManager() |
| Modifier and Type | Method and Description |
|---|---|
private org.w3c.dom.css.CSSStyleSheet |
_getCssStyleSheet(Source source) |
private Set<String> |
_getFontFamily(org.w3c.dom.css.CSSStyleSheet styleSheet) |
private List<String> |
_getRelativeCssFiles(String skinName)
Get the URI of CSS files listed in conf/glyph.xml file
|
private boolean |
_matchFontFamily(Set<String> fontFamilies,
org.w3c.dom.css.CSSStyleDeclaration style) |
void |
contextualize(Context context) |
Map<String,Object> |
getCSSFiles(String siteName)
Get the CSS files with 'font-face' rule in the skin
|
Set<String> |
getFontClassNames(org.w3c.dom.css.CSSStyleSheet styleSheet)
Get CSS class name to use for all icons.
|
Set<String> |
getGlyphClassNames(String skinName,
String cssURI)
Get the CSS class names for glyphes
|
Set<String> |
getGlyphes(String skinName)
Get the CSS class names for glyphes contained in the skin
|
List<String> |
getRelativeCssFilesWithFontFace(String skinName)
Get the URI of CSS files with the 'font-face' rule
|
boolean |
hasGlyphes(String siteName)
Determines if the skin has available glyphesIde
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate static final Pattern __CSS_CLASS_NAME
private SourceResolver _resolver
private SiteManager _siteManager
private Map<String,Long> _lastUpdates
public SkinGlyphSourceManager()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic boolean hasGlyphes(String siteName) throws Exception
siteName - The site nameException - if failed to read skin filespublic Set<String> getGlyphes(String skinName) throws Exception
skinName - The skin nameException - if failed to read skin filespublic Map<String,Object> getCSSFiles(String siteName) throws Exception
siteName - The site nameException - If failed to get the list of CSS files with 'font-face' rulepublic List<String> getRelativeCssFilesWithFontFace(String skinName) throws Exception
skinName - The skin nameException - if fails to read conf/glyph.xml fileprivate List<String> _getRelativeCssFiles(String skinName) throws Exception
skinName - The skin nameException - if fails to read conf/glyph.xml fileprivate org.w3c.dom.css.CSSStyleSheet _getCssStyleSheet(Source source) throws MalformedURLException, IOException
MalformedURLExceptionIOExceptionpublic Set<String> getFontClassNames(org.w3c.dom.css.CSSStyleSheet styleSheet)
styleSheet - The CSS stylesheet to parsepublic Set<String> getGlyphClassNames(String skinName, String cssURI) throws MalformedURLException, IOException
skinName - The skin namecssURI - The URI of CSS fileIOException - If fails to parse CSS fileMalformedURLException - if URI is malformedprivate boolean _matchFontFamily(Set<String> fontFamilies, org.w3c.dom.css.CSSStyleDeclaration style)
private Set<String> _getFontFamily(org.w3c.dom.css.CSSStyleSheet styleSheet)