Class DenormalisedSidManager
- java.lang.Object
-
- com.atlassian.confluence.security.denormalisedpermissions.impl.user.DenormalisedSidManager
-
public class DenormalisedSidManager extends Object
Creates and retrieves denormalised sids.- Since:
- 7.11.0
-
-
Constructor Summary
Constructors Constructor Description DenormalisedSidManager(org.springframework.transaction.PlatformTransactionManager transactionManager, DenormalisedSidDao denormalisedSidDao, DenormalisedLockService denormalisedLockService, com.atlassian.crowd.embedded.api.CrowdService crowdService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Long>
getAllGroupSidsAndCreateThemIfRequired(Set<String> groupNames)
Returns the corresponding sid ids for group keys.Set<Long>
getAllUserSids(ConfluenceUser confluenceUser)
Get all user sids.Map<String,Long>
getAllUserSidsAndCreateThemIfRequired(Set<String> userKeys)
Returns the corresponding sid ids for user keys.
-
-
-
Constructor Detail
-
DenormalisedSidManager
public DenormalisedSidManager(org.springframework.transaction.PlatformTransactionManager transactionManager, DenormalisedSidDao denormalisedSidDao, DenormalisedLockService denormalisedLockService, com.atlassian.crowd.embedded.api.CrowdService crowdService)
-
-
Method Detail
-
getAllUserSidsAndCreateThemIfRequired
public Map<String,Long> getAllUserSidsAndCreateThemIfRequired(Set<String> userKeys)
Returns the corresponding sid ids for user keys. If user sids do not exists, they will be created. Not that user sids should be created in a separate transaction to avoid collisions. What's more, this operation should acquire an exclusive lock first (to avoid updating them in parallel).- Parameters:
userKeys
- set of user user keys- Returns:
- map where the key is the user key and the value is sid id
-
getAllGroupSidsAndCreateThemIfRequired
public Map<String,Long> getAllGroupSidsAndCreateThemIfRequired(Set<String> groupNames)
Returns the corresponding sid ids for group keys. If user sids do not exists, they will be created. Not that user sids should be created in a separate transaction to avoid collisions. What's more, this operation should acquire an exclusive lock first (to avoid updating them in parallel).- Parameters:
groupNames
- set of group names- Returns:
- map where the key is the group name and the value is sid id
-
getAllUserSids
public Set<Long> getAllUserSids(ConfluenceUser confluenceUser)
Get all user sids. Not that it does not check whether user can access Confluence or not.- Parameters:
confluenceUser
- confluence user- Returns:
- all user ids
- Since:
- 7.12.0
-
-