Package org.nuxeo.theme.styling.service
Interface ThemeStylingService
-
- All Known Implementing Classes:
ThemeStylingServiceImpl
public interface ThemeStylingService
Service handling the mapping between a page and its resources and flavors.Registers some contributions to the
WebResourceManager
for compatibility.- Since:
- 5.5
- See Also:
FlavorDescriptor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ThemeStylingService.PRESET_CATEGORY
-
Field Summary
Fields Modifier and Type Field Description static String
FLAVOR_MARKER
static String
PAGE_STYLE_CLASS_NAME_PREFIX
static String
PAGE_STYLE_NAME_SUFFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDefaultFlavorName(String themePage)
Returns the default flavor for a given theme pageFlavorDescriptor
getFlavor(String flavorName)
Returns the flavor for given name, or null if not found.List<String>
getFlavorNames(String themePage)
Returns the flavor names for a given theme pageList<FlavorDescriptor>
getFlavors(String themePage)
Returns the flavors for a given theme pageLogoDescriptor
getLogo(String flavor)
Returns the logo configured for given flavor name, and fallbacks on the extends flavor logo if not set.PageDescriptor
getPage(String name)
Returns the page for given name.List<PageDescriptor>
getPages()
Rerurns all pages declared on the service, except the global one named "*".Map<String,String>
getPresetVariables(String flavorName)
Returns the map of variable replacements for given flavor.String
negotiate(String target, Object context)
Returns the negotiated String value for given target variable.
-
-
-
Field Detail
-
FLAVOR_MARKER
static final String FLAVOR_MARKER
- See Also:
- Constant Field Values
-
PAGE_STYLE_CLASS_NAME_PREFIX
static final String PAGE_STYLE_CLASS_NAME_PREFIX
- See Also:
- Constant Field Values
-
PAGE_STYLE_NAME_SUFFIX
static final String PAGE_STYLE_NAME_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultFlavorName
String getDefaultFlavorName(String themePage)
Returns the default flavor for a given theme page
-
getFlavorNames
List<String> getFlavorNames(String themePage)
Returns the flavor names for a given theme page
-
getFlavors
List<FlavorDescriptor> getFlavors(String themePage)
Returns the flavors for a given theme page
-
getFlavor
FlavorDescriptor getFlavor(String flavorName)
Returns the flavor for given name, or null if not found.If not defined on the local flavor, flavor attributes will be resolved from the extended flavor if any.
-
getPresetVariables
Map<String,String> getPresetVariables(String flavorName)
Returns the map of variable replacements for given flavor.Returns an empty map if flavor is not resolved.
- Since:
- 7.3
-
getLogo
LogoDescriptor getLogo(String flavor)
Returns the logo configured for given flavor name, and fallbacks on the extends flavor logo if not set.
-
getPage
PageDescriptor getPage(String name)
Returns the page for given name.Resources and bundles declared for all pages will also be attached to returned page.
- Since:
- 7.4
-
getPages
List<PageDescriptor> getPages()
Rerurns all pages declared on the service, except the global one named "*".Resources and bundles declared for all pages will also be attached to returned pages.
- Since:
- 7.10
-
-