eu.etaxonomy.cdm.api.service
Class GroupServiceImpl
java.lang.Object
eu.etaxonomy.cdm.api.service.ServiceBase<Group,IGroupDao>
eu.etaxonomy.cdm.api.service.GroupServiceImpl
- All Implemented Interfaces:
- IGroupService, IService<Group>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.security.provisioning.GroupManager
@Service
@Transactional(readOnly=true)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public class GroupServiceImpl
- extends ServiceBase<Group,IGroupDao>
- implements IGroupService
- Version:
- 1.0
- Author:
- n.hoffmann
|
Method Summary |
void |
addGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
|
void |
addUserToGroup(String username,
String groupName)
|
void |
createGroup(String groupName,
List<org.springframework.security.core.GrantedAuthority> authorities)
|
void |
deleteGroup(String groupName)
|
List<String> |
findAllGroups()
|
List<org.springframework.security.core.GrantedAuthority> |
findGroupAuthorities(String groupName)
|
List<String> |
findUsersInGroup(String groupName)
|
List<Group> |
listByName(String queryString,
MatchMode matchmode,
List<org.hibernate.criterion.Criterion> criteria,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Return a List of groups matching the given query string, optionally filtered by class, optionally with a particular MatchMode |
void |
removeGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
|
void |
removeUserFromGroup(String username,
String groupName)
|
void |
renameGroup(String oldName,
String newName)
|
protected void |
setDao(IGroupDao dao)
|
void |
setUserDao(IUserDao userDao)
|
| Methods inherited from class eu.etaxonomy.cdm.api.service.ServiceBase |
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IService |
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, update |
userDao
protected IUserDao userDao
GroupServiceImpl
public GroupServiceImpl()
findAllGroups
public List<String> findAllGroups()
- Specified by:
findAllGroups in interface org.springframework.security.provisioning.GroupManager
findUsersInGroup
public List<String> findUsersInGroup(String groupName)
- Specified by:
findUsersInGroup in interface org.springframework.security.provisioning.GroupManager
createGroup
@Transactional(readOnly=false)
public void createGroup(String groupName,
List<org.springframework.security.core.GrantedAuthority> authorities)
- Specified by:
createGroup in interface org.springframework.security.provisioning.GroupManager
deleteGroup
@Transactional(readOnly=false)
public void deleteGroup(String groupName)
- Specified by:
deleteGroup in interface org.springframework.security.provisioning.GroupManager
renameGroup
@Transactional(readOnly=false)
public void renameGroup(String oldName,
String newName)
- Specified by:
renameGroup in interface org.springframework.security.provisioning.GroupManager
addUserToGroup
@Transactional(readOnly=false)
public void addUserToGroup(String username,
String groupName)
- Specified by:
addUserToGroup in interface org.springframework.security.provisioning.GroupManager
removeUserFromGroup
@Transactional(readOnly=false)
public void removeUserFromGroup(String username,
String groupName)
- Specified by:
removeUserFromGroup in interface org.springframework.security.provisioning.GroupManager
findGroupAuthorities
public List<org.springframework.security.core.GrantedAuthority> findGroupAuthorities(String groupName)
- Specified by:
findGroupAuthorities in interface org.springframework.security.provisioning.GroupManager
addGroupAuthority
@Transactional(readOnly=false)
public void addGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
- Specified by:
addGroupAuthority in interface org.springframework.security.provisioning.GroupManager
removeGroupAuthority
@Transactional(readOnly=false)
public void removeGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
- Specified by:
removeGroupAuthority in interface org.springframework.security.provisioning.GroupManager
setDao
@Autowired
protected void setDao(IGroupDao dao)
- Specified by:
setDao in class ServiceBase<Group,IGroupDao>
setUserDao
@Autowired
public void setUserDao(IUserDao userDao)
listByName
@Transactional(readOnly=true)
public List<Group> listByName(String queryString,
MatchMode matchmode,
List<org.hibernate.criterion.Criterion> criteria,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
- Description copied from interface:
IGroupService
- Return a List of groups matching the given query string, optionally filtered by class, optionally with a particular MatchMode
- Specified by:
listByName in interface IGroupService
- Parameters:
queryString - the query string to filter bymatchmode - use a particular type of matching (can be null - defaults to exact matching)criteria - additional criteria to filter bypageSize - The maximum number of objects returned (can be null for all objects)pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints - Supports path like orderHints.propertyNames which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
- Returns:
- a list of instances of type Group matching the queryString
- See Also:
IIdentifiableEntityService#listByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}
Copyright © 2007-2013 EDIT. All Rights Reserved.