public interface SCFUtilities
Modifier and Type | Interface and Description |
---|---|
static class |
SCFUtilities.AVATAR_SIZE |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAvatar(UserProperties userProperties)
Returns the userProperties avatar URL or
InternalSCFUtilities.DEFAULT_AVATAR if profile has no avatar defined. |
java.lang.String |
getAvatar(UserProperties userProperties,
int size)
Returns the userProperties avatar URL or
InternalSCFUtilities.DEFAULT_AVATAR if profile has no avatar defined. |
java.lang.String |
getAvatar(UserProperties userProperties,
java.lang.String absoluteDefaultAvatar)
Returns the userProperties avatar URL or
InternalSCFUtilities.DEFAULT_AVATAR if profile has no avatar defined. |
java.lang.String |
getAvatar(UserProperties userProperties,
java.lang.String absoluteDefaultAvatar,
SCFUtilities.AVATAR_SIZE size)
Returns the userProperties avatar URL or absoluteDefaultAvatar if profile has no avatar defined.
|
Page |
getContainingPage(Resource resource)
Finds the page which contains the given resource.
|
java.lang.String |
getSocialProfileURL(java.lang.String username,
ResourceResolver resolver,
Page page)
Gets the social profile url for a user based on the page being passed in.
|
UserProperties |
getUserProperties(ResourceResolver resolver,
java.lang.String userId)
Returns the user properties denoted by the given
userId . |
Page getContainingPage(Resource resource)
resource
- the resource for which the page is to be foundjava.lang.String getSocialProfileURL(java.lang.String username, ResourceResolver resolver, Page page)
username
- user to find the profile for.resolver
- the resolver to use, which must have read access to the profile otherpage
- the page to use as the basis for the search for "cq:socialProfilePage" property.UserProperties getUserProperties(ResourceResolver resolver, java.lang.String userId)
userId
. The user props are looked for using the
provided resource resolver, so as to ensure that the user properties are only accessible to users having the
necessary access rights on the requested user properties.resolver
- The ResourceResolver
.userId
- The user id for which to retrieve the user properties.UserProperties
or null
if not found.java.lang.String getAvatar(UserProperties userProperties)
InternalSCFUtilities.DEFAULT_AVATAR
if profile has no avatar defined.userProperties
- The userProperties (may be null)java.lang.String getAvatar(UserProperties userProperties, java.lang.String absoluteDefaultAvatar)
InternalSCFUtilities.DEFAULT_AVATAR
if profile has no avatar defined.userProperties
- The userProperties (may be null)absoluteDefaultAvatar
- The absolute default avatarjava.lang.String getAvatar(UserProperties userProperties, java.lang.String absoluteDefaultAvatar, SCFUtilities.AVATAR_SIZE size)
userProperties
- The userProperties (may be null)absoluteDefaultAvatar
- The absolute default avatarsize
- The avatar size (for example, 32)java.lang.String getAvatar(UserProperties userProperties, int size)
InternalSCFUtilities.DEFAULT_AVATAR
if profile has no avatar defined.userProperties
- The userProperties (may be null)size
- The avatar size (for example, 32)"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"