public class DenormalisedSpacePermissionDao extends Object
SpacePermissionType
Modifier and Type | Field and Description |
---|---|
static long |
ALL_AUTHENTICATED_USERS_SID |
static long |
ANONYMOUS_USERS_SID |
static long |
FULL_CONFLUENCE_ACCESS |
Constructor and Description |
---|
DenormalisedSpacePermissionDao(org.hibernate.SessionFactory sessionFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addRecord(DenormalisedSpacePermission spacePermission,
SpacePermissionType spacePermissionType) |
Map<Long,List<DenormalisedSpacePermission>> |
findPermissionsForSpaces(Set<Long> spaceIds,
SpacePermissionType permissionType)
Retrieves all denormalised space permissions for the provided set of space ids
|
Set<Long> |
findPermittedSpaceIds(Set<Long> sids,
Set<Long> spaceIds,
SpacePermissionType permissionType)
Receives a set of space ids and returns only permitted ones.
|
List<Space> |
findPermittedSpaces(List<Long> sidList,
SpacePermissionType permissionType)
Retrieves all permitted spaces, filtered by space permissions and sid list
|
List<SpaceKeyWithPermission> |
getAllSpacesKeysWithPermissionInfo(Set<Long> sids,
SpacePermissionType permissionType)
Retrieves all space keys.
|
List<Space> |
getSpaces(Set<Long> sids,
SpacePermissionType permissionType,
SpacesQuery spaceQuery,
int offset,
int limit,
boolean permissionExempt)
Returns a list of permitted spaces
Spaces could be additionally filtered by provided optional filters
|
void |
removeRecord(DenormalisedSpacePermission spacePermission,
SpacePermissionType spacePermissionType) |
public static final long ANONYMOUS_USERS_SID
public static final long ALL_AUTHENTICATED_USERS_SID
public static final long FULL_CONFLUENCE_ACCESS
public DenormalisedSpacePermissionDao(org.hibernate.SessionFactory sessionFactory)
public Map<Long,List<DenormalisedSpacePermission>> findPermissionsForSpaces(Set<Long> spaceIds, SpacePermissionType permissionType)
spaceIds
- set of space idspermissionType
- permission type (view permissions or edit permissions)public List<Space> findPermittedSpaces(List<Long> sidList, SpacePermissionType permissionType)
sidList
- sid listpermissionType
- permission typepublic Set<Long> findPermittedSpaceIds(Set<Long> sids, Set<Long> spaceIds, SpacePermissionType permissionType)
sids
- user sidspermissionType
- permission typepublic List<SpaceKeyWithPermission> getAllSpacesKeysWithPermissionInfo(Set<Long> sids, SpacePermissionType permissionType)
sids
- sid listpermissionType
- permission typepublic void removeRecord(DenormalisedSpacePermission spacePermission, SpacePermissionType spacePermissionType)
public void addRecord(DenormalisedSpacePermission spacePermission, SpacePermissionType spacePermissionType)
public List<Space> getSpaces(Set<Long> sids, SpacePermissionType permissionType, SpacesQuery spaceQuery, int offset, int limit, boolean permissionExempt)
sids
- sid id listpermissionType
- permission typespaceQuery
- space queryoffset
- offsetlimit
- limitpermissionExempt
- if true all spaces should be returnedCopyright © 2003–2021 Atlassian. All rights reserved.