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

All Known Implementing Classes:
HibernateSpaceGroupPermissionDao

public interface SpaceGroupPermissionDao


Method Summary
 SpaceGroupPermission getById(long id)
           
 java.util.List getPermissionsForSpaceGroup(SpaceGroup spaceGroup)
           
 java.util.List<SpaceGroupPermission> getPermissionsForUser(java.lang.String username)
          Get space group permissions for the user.
 java.util.List<java.lang.String> getUsersWithPermission(SpaceGroup spaceGroup, java.lang.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(java.lang.String group)
           
 void removePermissionsForSpaceGroup(SpaceGroup spaceGroup)
           
 void removePermissionsForUser(java.lang.String userName)
           
 void saveOrUpdatePermission(SpaceGroupPermission perm)
          Saves or updates the specified perm.
 

Method Detail

getById

SpaceGroupPermission getById(long id)

getPermissionsForUser

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

Returns:
space group permissions for the user.
Throws:
java.lang.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

java.util.List getPermissionsForSpaceGroup(SpaceGroup spaceGroup)

removePermissionsForUser

void removePermissionsForUser(java.lang.String userName)

removePermissionsForGroup

void removePermissionsForGroup(java.lang.String group)

removePermissionsForSpaceGroup

void removePermissionsForSpaceGroup(SpaceGroup spaceGroup)

getUsersWithPermission

java.util.List<java.lang.String> getUsersWithPermission(SpaceGroup spaceGroup,
                                                        java.lang.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-2014 Atlassian. All Rights Reserved.