com.atlassian.confluence.hosted.persistence.dao
Interface SpaceGroupPermissionDao

All Known Implementing Classes:
HibernateSpaceGroupPermissionDao

public interface SpaceGroupPermissionDao


Method Summary
 SpaceGroupPermission getById(long id)
           
 List getPermissionsForSpaceGroup(SpaceGroup spaceGroup)
           
 List<SpaceGroupPermission> getPermissionsForUser(String username)
          Get space group permissions for the user.
 List<String> getUsersWithPermission(SpaceGroup spaceGroup, String type)
          Returns a list of usernames with permissions of a certain type to a SpaceGroup
 boolean hasPermission(SpaceGroupPermission permission)
          Determines whether permission exists in the data store
 void removePermission(SpaceGroupPermission spaceGroupPermission)
           
 void removePermissionsForGroup(String group)
           
 void removePermissionsForSpaceGroup(SpaceGroup spaceGroup)
           
 void removePermissionsForUser(String userName)
           
 void saveOrUpdatePermission(SpaceGroupPermission perm)
          Saves or updates the specified perm.
 

Method Detail

getById

SpaceGroupPermission getById(long id)

getPermissionsForUser

List<SpaceGroupPermission> getPermissionsForUser(String username)
Get space group permissions for the user.

Returns:
space group permissions for the user.
Throws:
IllegalArgumentException - if username is null

removePermission

void removePermission(SpaceGroupPermission spaceGroupPermission)

saveOrUpdatePermission

void saveOrUpdatePermission(SpaceGroupPermission perm)
Saves or updates the specified perm.


hasPermission

boolean hasPermission(SpaceGroupPermission permission)
Determines whether permission exists in the data store

Parameters:
permission - the SpacePermission to look up
Returns:
true if it exists, false otherwise

getPermissionsForSpaceGroup

List getPermissionsForSpaceGroup(SpaceGroup spaceGroup)

removePermissionsForUser

void removePermissionsForUser(String userName)

removePermissionsForGroup

void removePermissionsForGroup(String group)

removePermissionsForSpaceGroup

void removePermissionsForSpaceGroup(SpaceGroup spaceGroup)

getUsersWithPermission

List<String> getUsersWithPermission(SpaceGroup spaceGroup,
                                    String type)
Returns a list of usernames with permissions of a certain type to a SpaceGroup

Parameters:
spaceGroup - The SpaceGroup against which we want to check the permissions
type - The type of permission we want to check
Returns:
Collection of String usernames


Copyright © 2003-2013 Atlassian. All Rights Reserved.