SocialUtils重構

已棄用的SocialUtils套件

套件​com.adobe.cq.social.ugcbase.SocialUtils​已於AEM 6.1中淘汰。

下表列出要取代SocialUtils方法的方法。

SocialResourceUtilities套件

com.adobe.cq.social.srp.utilities.api.SocialResourceUtilities中的方法
布林值checkPermission(ResourceResolver,字串路徑,字串動作)
SocialResourceProvider getSocialResourceProvider(資源)
SocialResourceConfiguration getStorageConfig(資源資源)
資源getUGCResource(Resource userResource)
資源getUGCResource(Resource userResource, ResourceResolverFactory rrf)
資源getUGCResource(Resource userResource, ResourceResolverFactory rrf,字串resourceTypeHint)
資源getUGCResource(Resource userResource, String resourceTypeHint)
布林值hasModeratePermissions(資源)
字串資源ToACLPath(資源資源)
字串資源ToUGCStoragePath(資源資源)
字串UGCToResourcePath(資源資源)
字串UGCToResourcePath(字串ugcPath)
字串UGCToResourcePath(字串ugcPath, ResourceResolver)
com.adobe.cq.social.utilities.resource.api.SocialResourceUtilities中的方法
SocialResourceProvider getSocialResourceProvider(資源)

SCFUtilities包

com.adobe.cq.social.utilities.scf.api.SCFUtilites中的方法
字串getAvatar(UserProperties userProperties)
字串getAvatar(UserProperties userProperties, int size)
字串getAvatar(UserProperties userProperties, String absoluteDefaultAvatar)
字串getAvatar(UserProperties userProperties,字串absoluteDefaultAvatar, SocialUtils.AVATAR_SIZE大小)
Page getContainingPage(資源)
字串getSocialProfileURL(字串使用者名稱、 ResourceResolver、Page頁面)
UserProperties getUserProperties(ResourceResolver, String userId)

僅供內部使用

布林值canAddNode(工作階段,字串路徑)
字串createUniqueNameHint(字串消息)
字串createUniqueNameHint(字串消息, int numRandomChars)
字串generateRandomString(int length)
SocialResourceConfiguration getDefaultStorageConfig()
Page getPage(字串路徑, ResourceResolver)
字串getPagePath(資源)
字串getPagePath(字串路徑)
字串getResourceTypeForIncludedResource(Resource元件,字串defaultResourceType,字串designPropertyName)
字串getResourceTypeFromDesign(Resource, String styleProperty, String defaultValue)
布林值isResourceOwner(資源)
字串mapUGCPath(資源)
字串mapUGCPath(String ugcPath, ResourceResolver)
布林值mayPost(ResourceResolver,資源)
字串prepareUserGeneratedContent(ResourceResolver,字串路徑)

不再提供方法

Node createNode(ResourceResolver,字串路徑,字串nodeType)
資源getResourceAtPath(ResourceResolver,字串路徑)
資源getResourceAtPath(ResourceResolver,字串路徑,字串resourceType)
配置getStorageCloudServiceConfig(資源)
TranslationManager getTranslationManager()
TranslationSaveQueue getTranslationSaveQueue()
布林值mayAccessUGC(ResourceResolver)

本頁內容