com.atlassian.confluence.hosted.persistence.dao.hibernate
Class HibernateSpaceGroupPermissionDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.confluence.hosted.persistence.dao.hibernate.HibernateSpaceGroupPermissionDao
All Implemented Interfaces:
SpaceGroupPermissionDao, org.springframework.beans.factory.InitializingBean

public class HibernateSpaceGroupPermissionDao
extends org.springframework.orm.hibernate.support.HibernateDaoSupport
implements SpaceGroupPermissionDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateSpaceGroupPermissionDao()
           
 
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 perm)
           
 void removePermissionsForGroup(String group)
           
 void removePermissionsForSpaceGroup(SpaceGroup spaceGroup)
           
 void removePermissionsForUser(String userName)
           
 void saveOrUpdatePermission(SpaceGroupPermission perm)
          Saves or updates the specified perm.
 void setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)
           
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateSpaceGroupPermissionDao

public HibernateSpaceGroupPermissionDao()
Method Detail

getById

public SpaceGroupPermission getById(long id)
Specified by:
getById in interface SpaceGroupPermissionDao

getPermissionsForUser

public List<SpaceGroupPermission> getPermissionsForUser(String username)
Description copied from interface: SpaceGroupPermissionDao
Get space group permissions for the user.

Specified by:
getPermissionsForUser in interface SpaceGroupPermissionDao
Returns:
space group permissions for the user.

removePermission

public void removePermission(SpaceGroupPermission perm)
Specified by:
removePermission in interface SpaceGroupPermissionDao

saveOrUpdatePermission

public void saveOrUpdatePermission(SpaceGroupPermission perm)
Description copied from interface: SpaceGroupPermissionDao
Saves or updates the specified perm.

Specified by:
saveOrUpdatePermission in interface SpaceGroupPermissionDao

hasPermission

public boolean hasPermission(SpaceGroupPermission permission)
Description copied from interface: SpaceGroupPermissionDao
Determines whether permission exists in the data store

Specified by:
hasPermission in interface SpaceGroupPermissionDao
Parameters:
permission - the SpacePermission to look up
Returns:
true if it exists, false otherwise

getPermissionsForSpaceGroup

public List getPermissionsForSpaceGroup(SpaceGroup spaceGroup)
Specified by:
getPermissionsForSpaceGroup in interface SpaceGroupPermissionDao

removePermissionsForUser

public void removePermissionsForUser(String userName)
Specified by:
removePermissionsForUser in interface SpaceGroupPermissionDao

removePermissionsForGroup

public void removePermissionsForGroup(String group)
Specified by:
removePermissionsForGroup in interface SpaceGroupPermissionDao

removePermissionsForSpaceGroup

public void removePermissionsForSpaceGroup(SpaceGroup spaceGroup)
Specified by:
removePermissionsForSpaceGroup in interface SpaceGroupPermissionDao

getUsersWithPermission

public List<String> getUsersWithPermission(SpaceGroup spaceGroup,
                                           String type)
Description copied from interface: SpaceGroupPermissionDao
Returns a list of usernames with permissions of a certain type to a SpaceGroup

Specified by:
getUsersWithPermission in interface SpaceGroupPermissionDao
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

setConfluenceUserDao

public void setConfluenceUserDao(ConfluenceUserDao confluenceUserDao)


Copyright © 2003–2015 Atlassian. All rights reserved.