Interface SpacePermissionDao
- All Known Implementing Classes:
HibernateSpacePermissionDao
public interface SpacePermissionDao
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves all global permissionsfindAllGlobalPermissionsForType
(String permissionType) Retrieves all global permissions of type permissionTypefindGlobalGroupPermissions
(String permissionType) Find all global group permissions of typepermissionType
.findGroupPermissionsForSpace
(Space space, String permissionType) Find all group permissions of typepermissionType
forspace
.Find the permissions granted to the anonymous users in the given spacefindPermissionsForGroup
(String group) Retrieves all permissions for groupfindPermissionsForGroupInSpace
(String group, Space space) Find the permissions granted to the group in the given spacefindPermissionsForSpace
(Space space) Retrieves all permissions for spacefindPermissionsForSpacesAndTypes
(Set<Long> spaceIdList, Collection<String> typeList) Retrieves all permissions for the provides space list.Retrieves all permissions for userfindPermissionsForUserInSpace
(ConfluenceUser user, Space space) Find the permissions granted for a user in a spacefindPermissionTypes
(SpacePermission permission) Find all permission types matching the combination of (space, user, group, authenticated access subject) in permission.getById
(long id) Retrieves a single SpacePermission by its IDboolean
hasPermission
(SpacePermission permission) Determines whether permission exists in the data storevoid
remove
(SpacePermission spacePermission) void
removePermissionsForSpace
(Space space) Removes all permissions in spacevoid
save
(SpacePermission permission)
-
Method Details
-
getById
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
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()Retrieves all global permissions- Returns:
- a List of matching SpacePermission objects
-
findAllGlobalPermissionsForType
Retrieves all global permissions of type permissionType- Parameters:
permissionType
- the SpacePermission type to look up- Returns:
- a List of matching SpacePermission objects
-
findPermissionsForUser
Retrieves all permissions for user- Parameters:
user
- the user to look up- Returns:
- a List of SpacePermission objects
- Since:
- 5.3
-
findPermissionsForGroup
Retrieves all permissions for group- Parameters:
group
- the group to look up- Returns:
- a List of SpacePermission objects
-
findPermissionsForSpace
Retrieves all permissions for space- Parameters:
space
- the Space to look up- Returns:
- a List of SpacePermission objects
-
findPermissionsForUserInSpace
Find the permissions granted for a user in a space- Parameters:
user
- the user to look upspace
- the space to look up- Returns:
- a List of SpacePermission objects
- Since:
- 9.1.0
-
findPermissionsForGroupInSpace
Find the permissions granted to the group in the given space- Parameters:
group
- the group to look upspace
- the space to look up- Returns:
- a list of SpacePermission objects
- Since:
- 9.1.0
-
findPermissionsForAnonymousUsers
Find the permissions granted to the anonymous users in the given space- Parameters:
space
- the space to look up- Returns:
- a list of space permissions granted to anonymous users in the given space
- Since:
- 9.1.0
-
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
-
removePermissionsForSpace
Removes all permissions in space- Parameters:
space
- the Space that permissions will be removed from
-
findPermissionTypes
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
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
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
-
save
-
remove
-