public interface InternalSocialResourceUtilities
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASI_UGC_PREFIX
The SRP prefix.
|
static java.lang.String |
PATH_UGC |
static java.lang.String |
PN_ATTACHMENT_LIST |
static java.lang.String |
PN_BASETYPE |
static java.lang.String |
PN_COMMENT_RESOURCETYPE
The resources type for comments.
|
static java.lang.String |
PN_CS_ROOT |
static java.lang.String |
PN_DATE
The date field name.
|
static java.lang.String |
PN_DS_KEY |
static java.lang.String |
PN_ENTITY |
static java.lang.String |
PN_IS_REPLY |
static java.lang.String |
PN_PARENTID
The key used to describe a parent resource.
|
static java.lang.String |
SRP_CONFIGURATION_ROOT
Where config definitions are stored.
|
static java.lang.String |
SRP_DEFAULT_CONFIG_PATH |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createUniqueNameHint(java.lang.String message)
Creates a valid and unique JCR Node name given the message.
|
java.lang.String |
createUniqueNameHint(java.lang.String message,
int numRandomChars)
Creates a valid and unique JCR Node name given the message.
|
java.lang.String |
generateRandomString(int length)
Generates a (secure) random string with the given length.
|
SocialResourceConfiguration |
getDefaultStorageConfig()
Gets the default configuration set for the system.
|
java.util.List<java.lang.String> |
getUnreadableDescendants(ResourceResolver resolver,
Resource root,
java.util.List<Resource> exclusions)
Get the list of paths under the root's UGC that are not accessible by anonymous users.
|
java.lang.String |
mapUGCPath(java.lang.String ugcPath,
ResourceResolver resolver)
Map a UGC path, avoiding multiple round trips.
|
java.lang.String |
prepareUserGeneratedContent(ResourceResolver resolver,
java.lang.String path)
Prepare user generated content for the specified path.
|
java.lang.String |
prepareUserGeneratedContentWithLeafTypeHint(ResourceResolver resolver,
java.lang.String path,
java.lang.String typeHint,
boolean writeWithResolver)
Prepare the needed page paths in /content/usergenerated.
|
static final java.lang.String SRP_CONFIGURATION_ROOT
static final java.lang.String SRP_DEFAULT_CONFIG_PATH
static final java.lang.String PATH_UGC
static final java.lang.String ASI_UGC_PREFIX
static final java.lang.String PN_PARENTID
static final java.lang.String PN_BASETYPE
static final java.lang.String PN_CS_ROOT
static final java.lang.String PN_ATTACHMENT_LIST
static final java.lang.String PN_DS_KEY
static final java.lang.String PN_IS_REPLY
static final java.lang.String PN_ENTITY
static final java.lang.String PN_DATE
static final java.lang.String PN_COMMENT_RESOURCETYPE
@CheckForNull java.lang.String mapUGCPath(java.lang.String ugcPath, ResourceResolver resolver)
ugcPath
- the path to mapresolver
- the resolver to use to try and map the path@CheckForNull SocialResourceConfiguration getDefaultStorageConfig()
@Nonnull java.lang.String createUniqueNameHint(java.lang.String message)
message
- a starting to point for the name, will be stripped of invalid node name characters.@Nonnull java.lang.String createUniqueNameHint(java.lang.String message, int numRandomChars)
message
- a starting to point for the name, will be stripped of invalid node name characters.numRandomChars
- the number of characters to add as random noise in the name@Nonnull java.lang.String generateRandomString(int length)
length
- length of random string.java.lang.String prepareUserGeneratedContent(ResourceResolver resolver, java.lang.String path) throws SocialException
resolver
- The ResourceResolver
to use for persisting values.path
- The page pathSocialException
- if error occurs in Social Collaborationjava.lang.String prepareUserGeneratedContentWithLeafTypeHint(ResourceResolver resolver, java.lang.String path, java.lang.String typeHint, boolean writeWithResolver) throws SocialException
resolver
- Depending on the value of writeWithResolver, a resolver that can be used to read and/or write
the ugc page pathpath
- The page pathtypeHint
- the resource type for the last part of the page path or null.writeWithResolver
- If true, resolver can be used to both read and write the UGC page path. If false,
resolver can only be used to read the UGC page path. A service user will be used to create it if
needed.SocialException
- on failure@Nonnull java.util.List<java.lang.String> getUnreadableDescendants(@Nonnull ResourceResolver resolver, @Nonnull Resource root, @Nonnull java.util.List<Resource> exclusions)
resolver
- A resolver that can read the shadow paths associated with rootpath (eg, ugc-writer)root
- The root of the tree to be queried. This can be either a content path or a UGC path.exclusions
- The list of paths (presumably under root) that should be ignored by this function (because
they are uninteresting to the caller)Copyright © 2010 - 2020 Adobe. All Rights Reserved