@Deprecated public final class SocialResourceUtils extends java.lang.Object implements BundleActivator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GRAVATAR_PREFIX
Deprecated.
|
static java.lang.String |
SRP_CONFIGURATION_ROOT
Deprecated.
Where config definitions are stored.
|
static java.lang.String |
SRP_DEFAULT_CONFIG_PATH
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
causeByInvalidItemStateException(java.lang.Exception e)
Deprecated.
Check to see if the specified exception caused by a jcr InvalidItemStateException.
|
static java.lang.Boolean |
checkPermission(ResourceResolver resolver,
java.lang.String path,
java.lang.String action)
Deprecated.
Checks a path and an action based on the passed in resolver.
|
static java.lang.String |
getAvatar(UserProperties userProperties,
java.lang.String absoluteDefaultAvatar,
SocialUtils.AVATAR_SIZE size)
Deprecated.
Returns the userProperties avatar URL or
InternalSCFUtilities.DEFAULT_AVATAR if profile has no avatar defined. |
static java.lang.String |
getAvatar(UserProperties userProperties,
java.lang.String absoluteDefaultAvatar,
java.lang.String size)
Deprecated.
Returns the userProperties avatar URL or
InternalSCFUtilities.DEFAULT_AVATAR if profile has no avatar defined. |
static Configuration |
getFirstCloudStorageConfig(ResourceResolver resolver)
Deprecated.
No longer using cloud storage, will return the default configuration.
|
static SocialResource |
getSocialResource(Resource res)
Deprecated.
Check if a resource is a wrapped resource, and unwrap until a SocialResource is found.
|
static java.lang.String |
getUniqueUGCResourceName(ResourceResolver resourceResolver,
java.lang.String ugcPath,
SocialResourceProvider resourceProvider,
java.lang.String nodeName)
Deprecated.
|
static UserProperties |
getUserProperties(ResourceResolver resolver,
java.lang.String userId)
Deprecated.
Returns the user properties denoted by the given
userId . |
static boolean |
isCloudUGC(java.lang.String path)
Deprecated.
Check if path is non JCR based.
|
static boolean |
isSocialResource(Resource res)
Deprecated.
Check if a given resource is an instance of SocialResource.
|
void |
start(BundleContext context)
Deprecated.
|
void |
stop(BundleContext context)
Deprecated.
|
public static java.lang.String GRAVATAR_PREFIX
public static final java.lang.String SRP_CONFIGURATION_ROOT
public static final java.lang.String SRP_DEFAULT_CONFIG_PATH
public static java.lang.Boolean checkPermission(ResourceResolver resolver, java.lang.String path, java.lang.String action)
resolver
- the resource resolver to use to evaluate the permissionspath
- the path to the resource to checkaction
- the action to check@Deprecated public static Configuration getFirstCloudStorageConfig(ResourceResolver resolver)
resolver
- the resolver to usepublic static 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.public static java.lang.String getAvatar(UserProperties userProperties, java.lang.String absoluteDefaultAvatar, SocialUtils.AVATAR_SIZE size)
InternalSCFUtilities.DEFAULT_AVATAR
if profile has no avatar defined.userProperties
- The userProperties (may be null)absoluteDefaultAvatar
- The absolute default avatarsize
- The avatar size (for example, 32x48)public static java.lang.String getAvatar(UserProperties userProperties, java.lang.String absoluteDefaultAvatar, java.lang.String size)
InternalSCFUtilities.DEFAULT_AVATAR
if profile has no avatar defined.userProperties
- The userProperties (may be null)absoluteDefaultAvatar
- The absolute default avatarsize
- The avatar size (for example, 32)public static boolean isCloudUGC(java.lang.String path)
SocialUtils.ASI_UGC_PREFIX
, which is enforced in the cloudconfig UI.path
- the path to the ugc resourcepublic static boolean isSocialResource(Resource res)
res
- the resource to checkpublic static SocialResource getSocialResource(Resource res)
res
- resource to unwrappublic static boolean causeByInvalidItemStateException(java.lang.Exception e)
e
- The exceptionpublic void start(BundleContext context) throws java.lang.Exception
start
in interface BundleActivator
java.lang.Exception
public static java.lang.String getUniqueUGCResourceName(ResourceResolver resourceResolver, java.lang.String ugcPath, SocialResourceProvider resourceProvider, java.lang.String nodeName)
public void stop(BundleContext context) throws java.lang.Exception
stop
in interface BundleActivator
java.lang.Exception
Copyright © 2010 - 2020 Adobe. All Rights Reserved