public class MboxHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
generateLocationName(Resource currentResource,
WCMMode wcmMode,
java.lang.String... ambitMappings)
Generates the location name used by this location in Adobe Target.
|
static java.util.List<java.lang.String> |
getClientContextParameterNames(Resource resource,
InheritanceValueMap pageProperties,
ConfigurationManager configurationManager)
Returns the names of the ClientContext parameters which should be sent as part of mbox calls
|
static java.lang.String |
getCustomMboxJsPath(Resource resource,
Page currentPage,
ConfigurationManager cfgMgr)
Returns the repository path to a custom mbox.js file for the current specified resource and currentPage
|
static java.util.Map<java.lang.String,java.lang.String> |
getMappedClientContextParameterNames(Resource resource,
InheritanceValueMap pageProperties,
ConfigurationManager configurationManager)
Returns the names and mapped values of the ClientContext parameters which should be sent as part of mbox calls
|
static java.lang.String |
getMboxId(Resource rsrc)
Generates an mbox ID.
|
static java.lang.String |
getMboxId(java.lang.String location)
Generates an mbox ID from an mbox location.
|
static java.lang.String |
getMboxName(Resource rsrc)
Returns a name for the
Resource. |
static java.util.Map<java.lang.String,java.lang.String> |
getStaticParameters(Resource resource)
Returns the static parameters configured for this target component.
|
static boolean |
isAccurateRendering(Resource resource)
Returns true if the mbox represented by the resource has accurateTargeting enabled.
|
static java.lang.String |
qualifyMboxNameOrId(java.lang.String mboxNameOrId,
WCMMode wcmMode)
Adds the WCM mode qualifier to the mbox name, if necessary
|
static java.lang.String |
qualifyMboxNameOrId(java.lang.String mboxNameOrId,
WCMMode wcmMode,
java.lang.String ambitName)
Adds the necessary qualifiers (WCM Mode and the name of the ambit) to the mbox name
|
static Resource |
searchStartElement(Resource resource)
Search the start element for the current element type.
|
public static java.lang.String getMboxName(Resource rsrc)
Resource. As name the jcr:title with
removed whitespaces is used if available. If no jcr:title is specified,
a name is generated by getMboxId(Resource).public static java.lang.String generateLocationName(Resource currentResource, WCMMode wcmMode, java.lang.String... ambitMappings)
WCMMode is WCMMode.DISABLED then it's omitted. If not, the "--author" suffix is used.public static java.lang.String getMboxId(Resource rsrc)
rsrc - Resource of start/end elementResourcepublic static java.lang.String qualifyMboxNameOrId(java.lang.String mboxNameOrId,
WCMMode wcmMode)
mboxNameOrId - the mbox namewcmMode - the WCMModeWCMMode.DISABLED then the return value is the one passed in the mboxNameOrId parameterpublic static java.lang.String qualifyMboxNameOrId(java.lang.String mboxNameOrId,
WCMMode wcmMode,
java.lang.String ambitName)
mboxNameOrId - the actual mbox namewcmMode - the WCMModeambitName - the name of the ambit, if this mbox belongs to a site using MSMWCMMode.DISABLED and the ambit name is "master" then the return value is the one passed on the mboxNameOrId parameterpublic static java.lang.String getMboxId(java.lang.String location)
jcr:content is stripped from it.location - the mbox locationgetMboxId(Resource)public static Resource searchStartElement(Resource resource)
resource - Resourcepublic static java.lang.String getCustomMboxJsPath(Resource resource, Page currentPage, ConfigurationManager cfgMgr) throws RepositoryException
resource - ResourcecurrentPage - current PagecfgMgr - ConfigurationManagerRepositoryException - RepositoryExceptionpublic static boolean isAccurateRendering(Resource resource) throws RepositoryException
resource - ResourceRepositoryException - RepositoryExceptionpublic static java.util.List<java.lang.String> getClientContextParameterNames(Resource resource, InheritanceValueMap pageProperties, ConfigurationManager configurationManager) throws RepositoryException
This method merges the directly defined parameter names with the parameters names inherited from a Adobe Target framework.
resource - the target resourcepageProperties - InheritanceValueMapconfigurationManager - ConfigurationManagerRepositoryException - RepositoryExceptionpublic static java.util.Map<java.lang.String,java.lang.String> getMappedClientContextParameterNames(Resource resource, InheritanceValueMap pageProperties, ConfigurationManager configurationManager) throws RepositoryException
This method merges the directly defined parameter names with the parameters names inherited from a Adobe Target framework.
The mapped values are usually defined by the Framework. In case they are defined statically on the
component the property name is transformed by transforming all slashes ('/') to dots ('.').
resource - the target resourcepageProperties - InheritanceValueMapconfigurationManager - ConfigurationManagerRepositoryException - RepositoryExceptionpublic static java.util.Map<java.lang.String,java.lang.String> getStaticParameters(Resource resource)
resource - the Resource representing the target componentMap containing the mapped parametersCopyright © 2010 - 2023 Adobe. All Rights Reserved