public class MCMUtil extends Object
| Constructor and Description |
|---|
MCMUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPossibleSegmentsToValues(ValueMap content,
Map<String,Object> values,
ResourceResolver resourceResolver) |
static void |
addPossibleTagsToValues(Page aPage,
Map<String,Object> values) |
static User |
getAuthorizedUser(ResourceResolver rr,
String userId)
API to get authorizable user for the given Id
|
static String |
getSegmentName(ResourceResolver resolver,
String path)
Retrieves the title of the page under path or returns the path if the path
doesn't lead to a page.
|
static String |
getUserId(ResourceResolver rr,
String userId)
Fetch user name from the given id
|
static boolean |
isAnExperience(Resource resource)
Checks if the
resource is of an experience type
(cq/personalization/components/teaserpage,
cq/personalization/components/offerpage,
mcm/components/newsletter/page,
mcm/campaign/components/campaign_newsletterpage). |
static String |
removePossibleJcrContent(String path) |
static <T> void |
writeMapAsJsonObject(JSONWriter out,
Map<String,T> m) |
public static <T> void writeMapAsJsonObject(JSONWriter out, Map<String,T> m) throws JSONException
out - m - JSONExceptionpublic static void addPossibleTagsToValues(Page aPage, Map<String,Object> values) throws JSONException
JSONExceptionpublic static void addPossibleSegmentsToValues(ValueMap content, Map<String,Object> values, ResourceResolver resourceResolver) throws JSONException
JSONExceptionpublic static String getSegmentName(ResourceResolver resolver, String path)
resolver - path - public static User getAuthorizedUser(ResourceResolver rr, String userId)
rr - userId - public static String getUserId(ResourceResolver rr, String userId)
rr - userId - public static boolean isAnExperience(Resource resource)
resource is of an experience type
(cq/personalization/components/teaserpage,
cq/personalization/components/offerpage,
mcm/components/newsletter/page,
mcm/campaign/components/campaign_newsletterpage).resource - true if type is an experience type, false
otherwise.Copyright © 2010 - 2020 Adobe. All Rights Reserved