public interface ClientUtilities
Modifier and Type | Field and Description |
---|---|
static String |
JSON_EXTENSION
JSON extension.
|
static String |
QUERY_SELECTOR
The query selector.
|
static String |
SOCO_SELECTOR
GET Selector.
|
Modifier and Type | Method and Description |
---|---|
String |
externalLink(String path)
Computes the externalized URL to the resource at the given path.
|
String |
externalLink(String path,
Boolean needExtension)
Computes the externalized URL to the resource at the given path.
|
String |
filterHTML(String valueToBeFiltered)
Calls filterHTML on the provided String.
|
String |
getAuthorizedUserId()
Gets the authorized user ID.
|
Page |
getContainingPage(String path)
Returns the page that contains the resource at the given path if path is absolute.
|
MachineTranslationCloudConfig |
getMTCloudConfig(Resource resource)
Gets an Machine Translation config for the requested resource.
|
Page |
getPage(String pathToPage)
Returns the from the specified path.
|
SlingHttpServletRequest |
getRequest()
Get the original request
|
String |
getRequestExtension()
Get the current extension of the request.
|
SocialComponentFactoryManager |
getSocialComponentFactoryManager()
Get the
SocialComponentFactoryManager service. |
String |
getSocialProfilePath()
Helper method to get the configured social profile path for the page on which the resource is contained.
|
SocialUtils |
getSocialUtils()
Gets the
SocialUtils service. |
Configuration |
getStorageCloudConfig(Resource resource)
Gets an active storage cloud service configuration based on the requested resource.
|
User |
getUser(String userId,
ResourceResolver resolver)
Get the for the specified user ID.
|
boolean |
userIsAnonymous()
Helper method to check whether the user is anonymous (not logged in) or not.
|
static final String JSON_EXTENSION
static final String SOCO_SELECTOR
static final String QUERY_SELECTOR
String externalLink(String path)
path
- path to the resourceString externalLink(String path, Boolean needExtension)
path
- path to resourceneedExtension
- boolean to indicate whether the .social.json extension needs to be appended to the URLString getRequestExtension()
String filterHTML(String valueToBeFiltered)
valueToBeFiltered
- The String to be filtered.SocialComponentFactoryManager getSocialComponentFactoryManager()
SocialComponentFactoryManager
service.SocialUtils getSocialUtils()
SocialUtils
service.String getAuthorizedUserId()
boolean userIsAnonymous()
SlingHttpServletRequest getRequest()
SlingHttpServletRequest
requestString getSocialProfilePath()
Page getContainingPage(String path)
path
- the path to the resource for which the containing page is to be foundPage getPage(String pathToPage)
pathToPage
- path to a pagePage
object from the page path, or null.User getUser(String userId, ResourceResolver resolver)
userId
- The user ID of the user.User
representing the user id.Configuration getStorageCloudConfig(Resource resource)
resource
- The resource to get the active storage cloud service for.MachineTranslationCloudConfig getMTCloudConfig(Resource resource)
resource
- The resource to get the Machine Translation config for."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"