public class MCMUtil
extends java.lang.Object
Constructor and Description |
---|
MCMUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addPossibleSegmentsToValues(ValueMap content,
java.util.Map<java.lang.String,java.lang.Object> values,
ResourceResolver resourceResolver) |
static void |
addPossibleTagsToValues(Page aPage,
java.util.Map<java.lang.String,java.lang.Object> values) |
static User |
getAuthorizedUser(ResourceResolver rr,
java.lang.String userId)
API to get authorizable user for the given Id
|
static java.lang.String |
getSegmentName(ResourceResolver resolver,
java.lang.String path)
Retrieves the title of the page under path or returns the path if the path
doesn't lead to a page.
|
static java.lang.String |
getUserId(ResourceResolver rr,
java.lang.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 java.lang.String |
removePossibleJcrContent(java.lang.String path) |
static <T> void |
writeMapAsJsonObject(JSONWriter out,
java.util.Map<java.lang.String,T> m) |
public static java.lang.String removePossibleJcrContent(java.lang.String path)
public static <T> void writeMapAsJsonObject(JSONWriter out, java.util.Map<java.lang.String,T> m) throws JSONException
out
- m
- JSONException
public static void addPossibleTagsToValues(Page aPage, java.util.Map<java.lang.String,java.lang.Object> values) throws JSONException
JSONException
public static void addPossibleSegmentsToValues(ValueMap content, java.util.Map<java.lang.String,java.lang.Object> values, ResourceResolver resourceResolver) throws JSONException
JSONException
public static java.lang.String getSegmentName(ResourceResolver resolver, java.lang.String path)
resolver
- path
- public static User getAuthorizedUser(ResourceResolver rr, java.lang.String userId)
rr
- userId
- public static java.lang.String getUserId(ResourceResolver rr, java.lang.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