public class GuideThemeUtils
extends java.lang.Object
Constructor and Description |
---|
GuideThemeUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addTypekitConfigurations(JSONArray response,
ResourceResolver resourceResolver)
Deprecated.
|
static void |
addTypekitConfigurations(JSONArray response,
Resource theme,
ResourceResolver resourceResolver,
TypekitConfigurationService typekitConfigurationService) |
static void |
addTypekitConfigurations(JSONArray response,
Resource theme,
TypekitConfigurationService typekitConfigurationService) |
static void |
copyAssets(Resource fromResource,
Resource toResource,
ResourceResolver resourceResolver)
The API copies the asset Resource in inline style from fromResource to toResource.
|
static void |
copyStyles(Resource fromResource,
Resource toResource,
ResourceResolver resourceResolver,
java.lang.String cssClass)
The API copies the style Resource in inline style from fromResource to toResource.
|
static java.lang.String |
generateSelectorString(java.lang.String className,
java.lang.String cssSelector,
java.lang.Boolean makeDescendantSelector)
Check whether the resource type is theme
|
static java.lang.String |
getBaseClientlibCategory(ResourceResolver resourceResolver,
java.lang.String themeContentPath)
Get the base client lib category for the theme
|
static java.lang.String |
getClientLibCategory(Resource themeResource)
get clientLib category of the given resource.
|
static ThemeClientLibData |
getClientLibNames(Resource formResource,
java.lang.String themeOverride,
java.lang.String pageFallbackClientlib)
Gets the clientLib details to be included for an Adaptive Form
|
static java.lang.String |
getClientLibPath(Resource themeResource)
get clientLib path of the given resource.
|
static java.lang.String |
getCommonClientLibName(Resource themeContentResource)
Gets the common clientLib to be included with Theme.
|
static java.lang.String |
getComponentCssString(Component component,
ResourceResolver resolver,
java.util.List<BreakpointInfo> sortedBreakpoints,
java.util.List<BreakpointInfo> additionalBreakpointList,
java.util.Map<java.lang.String,java.lang.String> selectorMap,
ThemeMetadata themeMetadata) |
static java.lang.String |
getConfiguredFormPagePath(ResourceResolver resourceResolver,
java.lang.String themeContentPath)
The API provides the form page path configured in the Theme
|
static java.lang.String |
getConfiguredFormPath(ResourceResolver resourceResolver,
java.lang.String themeContentPath)
The API provides the form path configured in the Theme
|
static java.lang.String |
getThemeClientlibCategory(ResourceResolver resourceResolver,
java.lang.String themeContentPath)
Get the theme client library for a given theme path
|
static java.lang.String |
getThemeCSS(Theme theme,
ResourceResolver resolver,
ResourceMergerService resourceMergerService) |
static java.lang.String |
getWebFontConfig(ResourceResolver resourceResolver,
java.lang.String themeContentPath)
Gets the path of web font config associated with a theme.
|
static boolean |
isResourceTheme(Resource themeContentResource)
Check whether the resource type is theme
|
static java.lang.String |
makeCssComment(java.lang.String cssString)
Check if Property present in masked List or not.
|
static void |
saveInlineCSS(Resource resource,
java.lang.String formPath,
ResourceMergerService resourceMergerService) |
static void |
saveThemeCSS(Theme theme,
ResourceResolver resolver,
ResourceMergerService resourceMergerService) |
static java.util.List<BreakpointInfo> |
sortBreakpoints(java.util.List<BreakpointInfo> breakpoints) |
public static java.lang.String getConfiguredFormPagePath(ResourceResolver resourceResolver, java.lang.String themeContentPath)
resourceResolver
- ResourceResolver instancethemeContentPath
- Path of the themepublic static java.lang.String getConfiguredFormPath(ResourceResolver resourceResolver, java.lang.String themeContentPath)
resourceResolver
- ResourceResolver instancethemeContentPath
- Path of the themepublic static java.lang.String getThemeClientlibCategory(ResourceResolver resourceResolver, java.lang.String themeContentPath)
resourceResolver
- ResourceResolver instancethemeContentPath
- Path of the themepublic static java.lang.String getBaseClientlibCategory(ResourceResolver resourceResolver, java.lang.String themeContentPath)
resourceResolver
- ResourceResolver instancethemeContentPath
- Path of the themepublic static void saveThemeCSS(Theme theme, ResourceResolver resolver, ResourceMergerService resourceMergerService) throws GuideException
GuideException
public static java.lang.String getThemeCSS(Theme theme, ResourceResolver resolver, ResourceMergerService resourceMergerService)
public static java.lang.String getComponentCssString(Component component, ResourceResolver resolver, java.util.List<BreakpointInfo> sortedBreakpoints, java.util.List<BreakpointInfo> additionalBreakpointList, java.util.Map<java.lang.String,java.lang.String> selectorMap, ThemeMetadata themeMetadata)
public static void saveInlineCSS(Resource resource, java.lang.String formPath, ResourceMergerService resourceMergerService)
public static java.util.List<BreakpointInfo> sortBreakpoints(java.util.List<BreakpointInfo> breakpoints)
public static java.lang.String makeCssComment(java.lang.String cssString)
cssString
- CssString to be commented.public static void copyAssets(Resource fromResource, Resource toResource, ResourceResolver resourceResolver)
fromResource
- the Resource whose style resource is being copied.toResource
- the Resource where style resource is copied.resourceResolver
- resourceResolver instance.public static void copyStyles(Resource fromResource, Resource toResource, ResourceResolver resourceResolver, java.lang.String cssClass)
fromResource
- the Resource whose style resource is being copied.toResource
- the Resource where style resource is copied.resourceResolver
- resourceResolver instance.cssClass
- cssClass of the copied Resource.public static java.lang.String getClientLibCategory(Resource themeResource)
themeResource
- Theme jcr content resourcepublic static java.lang.String getClientLibPath(Resource themeResource)
themeResource
- Theme jcr content resourcepublic static java.lang.String getWebFontConfig(ResourceResolver resourceResolver, java.lang.String themeContentPath)
resourceResolver
- themeContentPath
- Path of jcr:content node of theme resource.public static java.lang.String getCommonClientLibName(Resource themeContentResource)
themeContentResource
- Theme jcr:content resource.public static ThemeClientLibData getClientLibNames(Resource formResource, java.lang.String themeOverride, java.lang.String pageFallbackClientlib)
formResource
- Form resourcethemeOverride
- Path of Theme to be overriddenpageFallbackClientlib
- fallback clientLibpublic static boolean isResourceTheme(Resource themeContentResource)
themeContentResource
- Theme jcr:content resource.public static java.lang.String generateSelectorString(java.lang.String className, java.lang.String cssSelector, java.lang.Boolean makeDescendantSelector)
className
- Inline Style component prefiex Class.cssSelector
- css selector for the particular selector.makeDescendantSelector
- If we want prefix class to be along side the css selector or above it.public static void addTypekitConfigurations(JSONArray response, Resource theme, TypekitConfigurationService typekitConfigurationService) throws JSONException
JSONException
public static void addTypekitConfigurations(JSONArray response, Resource theme, ResourceResolver resourceResolver, TypekitConfigurationService typekitConfigurationService) throws JSONException
JSONException
@Deprecated public static void addTypekitConfigurations(JSONArray response, ResourceResolver resourceResolver) throws JSONException
JSONException
Copyright © 2010 - 2020 Adobe. All Rights Reserved