com.atlassian.confluence.security.persistence.dao
Interface SpacePermissionDao

All Superinterfaces:
ObjectDao, VersionedObjectDao
All Known Implementing Classes:
HibernateSpacePermissionDao

public interface SpacePermissionDao
extends VersionedObjectDao


Method Summary
 java.util.List findAllGlobalPermissions()
          Retreives all global permissions
 java.util.List findAllGlobalPermissionsForType(java.lang.String permissionType)
          Retrieves all global permissions of type permissionType
 java.util.List findPermissionsForGroup(java.lang.String group)
          Retrieves all permissions for group
 java.util.List findPermissionsForSpace(Space space)
          Retrieves all permissions for space
 java.util.List findPermissionsForUser(java.lang.String userName)
          Retrieves all permissions for userName
 java.util.List findPermissionTypes(SpacePermission permission)
          Find all permission types matching the combination of (space, user, group) in permission.
 SpacePermission getById(long id)
          Retrieves a single SpacePermission by its ID
 boolean hasPermission(SpacePermission permission)
          Determines whether permission exists in the data store
 void removePermissionsForGroup(java.lang.String group)
          Removes all permissions for group
 void removePermissionsForSpace(Space space)
          Removes all permissions in space
 void removePermissionsForUser(java.lang.String userName)
          Removes all permissions for userName
 
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao
findLatestVersionsCount, findLatestVersionsIterator, save
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

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

java.util.List findAllGlobalPermissions()
Retreives all global permissions

Returns:
a List of matching SpacePermission objects

findAllGlobalPermissionsForType

java.util.List findAllGlobalPermissionsForType(java.lang.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

java.util.List findPermissionsForUser(java.lang.String userName)
Retrieves all permissions for userName

Parameters:
userName - the username to look up
Returns:
a List of SpacePermission objects

findPermissionsForGroup

java.util.List findPermissionsForGroup(java.lang.String group)
Retrieves all permissions for group

Parameters:
group - the group to look up
Returns:
a List of SpacePermission objects

findPermissionsForSpace

java.util.List findPermissionsForSpace(Space space)
Retrieves all permissions for space

Parameters:
space - the Space to look up
Returns:
a List of SpacePermission objects

removePermissionsForUser

void removePermissionsForUser(java.lang.String userName)
Removes all permissions for userName

Parameters:
userName - the User whose permissions will be removed

removePermissionsForGroup

void removePermissionsForGroup(java.lang.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

java.util.List findPermissionTypes(SpacePermission permission)
Find all permission types matching the combination of (space, user, group) in permission.

Parameters:
permission - the permission to look up
Returns:
a List of SpacePermission objects


Copyright © 2003-2010 Atlassian. All Rights Reserved.