Package com.day.cq.personalization
Class ClientContextUtil
java.lang.Object
com.day.cq.personalization.ClientContextUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns a valid DOM id based on a path or a random string (replaces invalid characters by "_").getPlugins
(ResourceResolver resourceResolver, String[] locations) Returns a list of plugins (paths to JS files) defined into specified locations.
-
Constructor Details
-
ClientContextUtil
public ClientContextUtil()
-
-
Method Details
-
getPlugins
Returns a list of plugins (paths to JS files) defined into specified locations. If 2 plugins have the same name, list will contain the one in the last location.- Parameters:
resourceResolver
- Resource resolverlocations
- Locations where to search for plugins- Returns:
- a list of plugins path
-
getId
Returns a valid DOM id based on a path or a random string (replaces invalid characters by "_").- Parameters:
idToFilter
- A repository path or a random string- Returns:
- A valid DOM id or an empty string
-