public class SitecatalystUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Resource |
findAnalyticsResource(ResourceResolver resolver,
Resource resource)
|
static java.lang.Integer |
getCookieDomainNamePeriod(SlingHttpServletRequest request,
java.lang.String server)
Returns number of domain name periods.
|
static java.lang.String |
getFormattedPagePath(Resource pageResource,
Configuration configuration)
Formats the resource path of a Resource
pageResource
relative to the provided
Configuration path. |
static java.lang.String |
getPublishPreferredReportSuite(Configuration config)
Returns one of the configured report suites based on the following rules:
return first publish report suite, if not, return first report suite for all
run modes and if still nothing available return first author report suite
|
static java.lang.String |
getReportSuites(SlingSettingsService settingsService,
Configuration configuration)
Returns a comma separated list of report suites depending on the current
run mode of the server.
|
static java.lang.String |
getServer(SlingHttpServletRequest request,
Configuration config)
Returns server URL according to request scheme.
|
public static java.lang.String getServer(SlingHttpServletRequest request, Configuration config)
request
- the requestconfig
- the configurationpublic static java.lang.String getReportSuites(SlingSettingsService settingsService, Configuration configuration)
settingsService
- SlingSettingsServiceconfiguration
- the configuratinpublic static java.lang.Integer getCookieDomainNamePeriod(SlingHttpServletRequest request, java.lang.String server)
request
- the requestserver
- the server urlpublic static java.lang.String getFormattedPagePath(Resource pageResource, Configuration configuration)
pageResource
relative to the provided
Configuration
path. A trailing
slash will be removed if present, all other slashes will be replaced by
colons.
/content/geometrixx/en/support
will be formatted to
content:geometrixx:en:support
pageResource
- page Resourceconfiguration
- SiteCatalyst configurationpublic static Resource findAnalyticsResource(ResourceResolver resolver, Resource resource)
Resource
until a Page
with a valid analytics
configuration is found. The configuration is considered valid if the node
has a property cq:services.resolver
- ResourceResolver
resource
- Resource
null
if none could be found.public static java.lang.String getPublishPreferredReportSuite(Configuration config)
config
- the Analytics configurationCopyright © 2010 - 2020 Adobe. All Rights Reserved