Interface SpacePermissionDao
-
- All Superinterfaces:
ObjectDao
,VersionedObjectDao<SpacePermission>
- All Known Implementing Classes:
HibernateSpacePermissionDao
public interface SpacePermissionDao extends VersionedObjectDao<SpacePermission>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<SpacePermission>
findAllGlobalPermissions()
Retreives all global permissionsList<SpacePermission>
findAllGlobalPermissionsForType(String permissionType)
Retrieves all global permissions of type permissionTypeCollection<SpacePermission>
findGlobalGroupPermissions(String permissionType)
Find all global group permissions of typepermissionType
.Collection<SpacePermission>
findGroupPermissionsForSpace(Space space, String permissionType)
Find all group permissions of typepermissionType
forspace
.List<SpacePermission>
findPermissionsForGroup(String group)
Retrieves all permissions for groupList<SpacePermission>
findPermissionsForSpace(Space space)
Retrieves all permissions for spaceList<SpacePermissionDTOLight>
findPermissionsForSpacesAndTypes(Set<Long> spaceIdList, Collection<String> typeList)
Retrieves all permissions for the provides space list.List<SpacePermission>
findPermissionsForUser(ConfluenceUser user)
Retrieves all permissions for userList
findPermissionTypes(SpacePermission permission)
Find all permission types matching the combination of (space, user, group, authenticated access subject) in permission.SpacePermission
getById(long id)
Retrieves a single SpacePermission by its IDboolean
hasPermission(SpacePermission permission)
Determines whether permission exists in the data storevoid
removePermissionsForGroup(String group)
Removes all permissions for groupvoid
removePermissionsForSpace(Space space)
Removes all permissions in spacevoid
removePermissionsForUser(String userName)
Removes all permissions for userName-
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, findByClassIds, getPersistentClass, refresh, remove, replicate, save, saveRaw
-
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
-
-
-
-
Method Detail
-
getById
SpacePermission getById(long id)
Retrieves a single SpacePermission by its ID- Parameters:
id
- the SpacePermission to retrieve- Returns:
- a SpacePermission object, or null if it could not be found
-
hasPermission
boolean hasPermission(SpacePermission permission)
Determines whether permission exists in the data store- Parameters:
permission
- the SpacePermission to look up- Returns:
- true if it exists, false otherwise
-
findAllGlobalPermissions
List<SpacePermission> findAllGlobalPermissions()
Retreives all global permissions- Returns:
- a List of matching SpacePermission objects
-
findAllGlobalPermissionsForType
List<SpacePermission> findAllGlobalPermissionsForType(String permissionType)
Retrieves all global permissions of type permissionType- Parameters:
permissionType
- the SpacePermission type to look up- Returns:
- a List of matching SpacePermission objects
-
findPermissionsForUser
List<SpacePermission> findPermissionsForUser(ConfluenceUser user)
Retrieves all permissions for user- Parameters:
user
- the user to look up- Returns:
- a List of SpacePermission objects
- Since:
- 5.3
-
findPermissionsForGroup
List<SpacePermission> findPermissionsForGroup(String group)
Retrieves all permissions for group- Parameters:
group
- the group to look up- Returns:
- a List of SpacePermission objects
-
findPermissionsForSpace
List<SpacePermission> findPermissionsForSpace(Space space)
Retrieves all permissions for space- Parameters:
space
- the Space to look up- Returns:
- a List of SpacePermission objects
-
findPermissionsForSpacesAndTypes
List<SpacePermissionDTOLight> findPermissionsForSpacesAndTypes(Set<Long> spaceIdList, Collection<String> typeList)
Retrieves all permissions for the provides space list. This method was introduced to avoid joins spaces (Hibernates joins Space table by default).- Parameters:
spaceIdList
- list of space idtypeList
- list of permission types to retrive- Returns:
- a list light space permission object
- Since:
- 7.10.0
-
removePermissionsForUser
void removePermissionsForUser(String userName)
Removes all permissions for userName- Parameters:
userName
- the User whose permissions will be removed
-
removePermissionsForGroup
void removePermissionsForGroup(String group)
Removes all permissions for group- Parameters:
group
- the Group whose permissions will be removed
-
removePermissionsForSpace
void removePermissionsForSpace(Space space)
Removes all permissions in space- Parameters:
space
- the Space that permissions will be removed from
-
findPermissionTypes
List findPermissionTypes(SpacePermission permission)
Find all permission types matching the combination of (space, user, group, authenticated access subject) in permission.- Parameters:
permission
- the permission to look up- Returns:
- a List of SpacePermission objects
-
findGroupPermissionsForSpace
Collection<SpacePermission> findGroupPermissionsForSpace(Space space, String permissionType)
Find all group permissions of typepermissionType
forspace
.- Parameters:
permissionType
- one of the constants inSpacePermission
, such asSpacePermission.VIEWSPACE_PERMISSION
.- Returns:
- a non-null collection of permissions
- Since:
- 4.0
-
findGlobalGroupPermissions
Collection<SpacePermission> findGlobalGroupPermissions(String permissionType)
Find all global group permissions of typepermissionType
.- Parameters:
permissionType
- one of the constants inSpacePermission
, such asSpacePermission.USE_CONFLUENCE_PERMISSION
.- Returns:
- a non-null collection of permissions
- Since:
- 4.0
-
-