Class DefaultContentPermissionCalculator
- java.lang.Object
-
- com.atlassian.confluence.impl.search.v2.DefaultContentPermissionCalculator
-
- All Implemented Interfaces:
ContentPermissionCalculator
public class DefaultContentPermissionCalculator extends Object implements ContentPermissionCalculator
- Since:
- 7.17
-
-
Constructor Summary
Constructors Constructor Description DefaultContentPermissionCalculator(InheritedContentPermissionManager inheritedContentPermissionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ContentPermissionSet>
calculate(@Nullable ContentEntityObject contentEntityObject)
String
getEncodedContentPermissionSets(Collection<ContentPermissionSet> contentPermissionSets)
String
getEncodedGroupName(String groupname)
Collection<String>
getEncodedPermissionsCollection(ContentPermissionSet contentPermissionSet)
Encodes the user keys and groups in the contentPermissionSet for storage in indexString
getEncodedUserKey(ConfluenceUser user)
String
getEncodedUserKey(com.atlassian.sal.api.user.UserKey userKey)
-
-
-
Constructor Detail
-
DefaultContentPermissionCalculator
public DefaultContentPermissionCalculator(InheritedContentPermissionManager inheritedContentPermissionManager)
-
-
Method Detail
-
calculate
public List<ContentPermissionSet> calculate(@Nullable ContentEntityObject contentEntityObject)
- Specified by:
calculate
in interfaceContentPermissionCalculator
- Parameters:
contentEntityObject
- the content entity object that we need to calculate its permissions- Returns:
- a collection of
ContentPermissionSet
-
getEncodedContentPermissionSets
public String getEncodedContentPermissionSets(Collection<ContentPermissionSet> contentPermissionSets)
- Specified by:
getEncodedContentPermissionSets
in interfaceContentPermissionCalculator
-
getEncodedPermissionsCollection
public Collection<String> getEncodedPermissionsCollection(ContentPermissionSet contentPermissionSet)
Description copied from interface:ContentPermissionCalculator
Encodes the user keys and groups in the contentPermissionSet for storage in index- Specified by:
getEncodedPermissionsCollection
in interfaceContentPermissionCalculator
- Parameters:
contentPermissionSet
- a set of content permissions (user key and groups)- Returns:
- a collection of encoded user keys and groups
-
getEncodedGroupName
public String getEncodedGroupName(String groupname)
- Specified by:
getEncodedGroupName
in interfaceContentPermissionCalculator
-
getEncodedUserKey
public String getEncodedUserKey(ConfluenceUser user)
- Specified by:
getEncodedUserKey
in interfaceContentPermissionCalculator
- Since:
- 5.2
-
getEncodedUserKey
public String getEncodedUserKey(com.atlassian.sal.api.user.UserKey userKey)
- Specified by:
getEncodedUserKey
in interfaceContentPermissionCalculator
- Parameters:
userKey
- the plain user key- Returns:
- the encoded user key
- Since:
- 7.16
-
-