public class ThemeStylingServiceImpl extends DefaultComponent implements ThemeStylingService
ThemeStylingService
ThemeStylingService.PRESET_CATEGORY
FLAVOR_MARKER, PAGE_STYLE_CLASS_NAME_PREFIX, PAGE_STYLE_NAME_SUFFIX
Constructor and Description |
---|
ThemeStylingServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
String |
getDefaultFlavorName(String themePageName)
Returns the default flavor for a given theme page
|
Flavor |
getFlavor(String flavorName)
Returns the flavor for given name, or null if not found.
|
List<String> |
getFlavorNames(String themePageName)
Returns the flavor names for a given theme page
|
List<Flavor> |
getFlavors(String themePageName)
Returns the flavors for a given theme page
|
Logo |
getLogo(String flavorName)
Returns the logo configured for given flavor name, and fallbacks on the extends flavor logo if not set.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
themeGlobalResourcesRegistered(URL themeUrl)
Hook to notify the service that global resources for a theme need to be registered
|
void |
themeRegistered(String themeName)
Hook to notify the service that a theme has been registered
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtension
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public String getDefaultFlavorName(String themePageName)
ThemeStylingService
getDefaultFlavorName
in interface ThemeStylingService
public Flavor getFlavor(String flavorName)
ThemeStylingService
If not defined on the local flavor, flavor attributes will be resolved from the extended flavor if any (except
presets that just need to be resolved at registration to the ThemeService
.
getFlavor
in interface ThemeStylingService
public Logo getLogo(String flavorName)
ThemeStylingService
getLogo
in interface ThemeStylingService
public List<String> getFlavorNames(String themePageName)
ThemeStylingService
getFlavorNames
in interface ThemeStylingService
public List<Flavor> getFlavors(String themePageName)
ThemeStylingService
getFlavors
in interface ThemeStylingService
public void themeRegistered(String themeName)
ThemeStylingService
themeRegistered
in interface ThemeStylingService
public void themeGlobalResourcesRegistered(URL themeUrl)
ThemeStylingService
themeGlobalResourcesRegistered
in interface ThemeStylingService
Copyright © 2015 Nuxeo SA. All rights reserved.