Class ContentPermissionSearchUtils
- java.lang.Object
-
- com.atlassian.confluence.impl.search.v2.lucene.ContentPermissionSearchUtils
-
public class ContentPermissionSearchUtils extends Object
For changes to this class, ensure they are also made to: https://stash.atlassian.com/projects/CONF/repos/elasticsearch-confluence/browse/src/main/java/com/atlassian/elasticsearch/plugin/ContentPermissionSearchUtils.java
-
-
Field Summary
Fields Modifier and Type Field Description static String
ESCAPE_CHAR
-
Constructor Summary
Constructors Constructor Description ContentPermissionSearchUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterator<Set<String>>
decodeContentPermissionSets(String encodedContentPermissionSets)
Decodes a string contains multiple "&'-separatedContentPermissionSet
s, which have themselves been encoded bygetEncodedContentPermissionSet(ContentPermissionSet)
.static String
getEncodedContentPermissionSet(ContentPermissionSet contentPermissionSet)
static String
getEncodedContentPermissionSets(Collection<ContentPermissionSet> contentPermissionSets)
Encode the givenContentPermissionSet
s as a String suitable for use as an index field value.static String
getEncodedGroupName(String groupname)
static String
getEncodedUserKey(ConfluenceUser user)
static String
getEncodedUserKey(com.atlassian.sal.api.user.UserKey userKey)
-
-
-
Field Detail
-
ESCAPE_CHAR
public static final String ESCAPE_CHAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEncodedContentPermissionSets
public static String getEncodedContentPermissionSets(Collection<ContentPermissionSet> contentPermissionSets)
Encode the givenContentPermissionSet
s as a String suitable for use as an index field value.- Since:
- 7.14
-
getEncodedContentPermissionSet
public static String getEncodedContentPermissionSet(ContentPermissionSet contentPermissionSet)
- Returns:
- the encoded content permission set for indexing and filtering. returns null if a null perm set is passed in.
- See Also:
ContentEntityMetadataExtractor
,ContentPermissionsFilter
-
getEncodedUserKey
public static String getEncodedUserKey(ConfluenceUser user)
- Since:
- 5.2
-
getEncodedUserKey
public static String getEncodedUserKey(com.atlassian.sal.api.user.UserKey userKey)
- Parameters:
userKey
- the plain user key- Returns:
- the encoded user key
- Since:
- 7.16
-
decodeContentPermissionSets
public static Iterator<Set<String>> decodeContentPermissionSets(String encodedContentPermissionSets)
Decodes a string contains multiple "&'-separatedContentPermissionSet
s, which have themselves been encoded bygetEncodedContentPermissionSet(ContentPermissionSet)
. The returned Iterator is lazy, i.e. it decodes the string segments as the iterator advances.- Returns:
- an
Iterator
ofContentPermissionSet
s themselves represented by aSet
of encodedContentPermission
s. - Since:
- 7.1
-
-