Package com.day.cq.personalization
Class ClientContextUtil
- java.lang.Object
-
- com.day.cq.personalization.ClientContextUtil
-
public class ClientContextUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ClientContextUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getId(java.lang.String idToFilter)
Returns a valid DOM id based on a path or a random string (replaces invalid characters by "_").static java.util.List<java.lang.String>
getPlugins(ResourceResolver resourceResolver, java.lang.String[] locations)
Returns a list of plugins (paths to JS files) defined into specified locations.
-
-
-
Method Detail
-
getPlugins
public static java.util.List<java.lang.String> getPlugins(ResourceResolver resourceResolver, java.lang.String[] locations)
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
public static java.lang.String getId(java.lang.String idToFilter)
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
-
-