|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.etaxonomy.cdm.api.service.ServiceBase<User,IUserDao>
eu.etaxonomy.cdm.api.service.UserService
@Service @Transactional(readOnly=true) public class UserService
Note: All group related functionality has been refactored into a GroupService. The will be removed in a future version.
| Field Summary | |
|---|---|
protected IGrantedAuthorityDao |
grantedAuthorityDao
|
protected IGroupDao |
groupDao
|
| Fields inherited from class eu.etaxonomy.cdm.api.service.ServiceBase |
|---|
appContext, dao |
| Constructor Summary | |
|---|---|
UserService()
|
|
| Method Summary | |
|---|---|
void |
addGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
Deprecated. |
void |
addUserToGroup(String username,
String groupName)
Deprecated. |
void |
changePassword(String oldPassword,
String newPassword)
|
void |
changePasswordForUser(String username,
String newPassword)
|
void |
createGroup(String groupName,
List<org.springframework.security.core.GrantedAuthority> authorities)
Deprecated. |
protected org.springframework.security.core.Authentication |
createNewAuthentication(org.springframework.security.core.Authentication currentAuth,
String newPassword)
|
void |
createUser(org.springframework.security.core.userdetails.UserDetails user)
|
UUID |
delete(User persistentObject)
Delete an existing persistent object |
void |
deleteGroup(String groupName)
Deprecated. |
void |
deleteUser(String username)
|
List<String> |
findAllGroups()
Deprecated. |
List<org.springframework.security.core.GrantedAuthority> |
findGroupAuthorities(String groupName)
Deprecated. |
List<String> |
findUsersInGroup(String groupName)
Deprecated. |
List<User> |
listByUsername(String queryString,
MatchMode matchmode,
List<org.hibernate.criterion.Criterion> criteria,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Return a List of users matching the given query string, optionally filtered by class, optionally with a particular MatchMode |
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(String username)
DO NOT CALL THIS METHOD IN LONG RUNNING SESSIONS OR CONVERSATIONS A THROWN UsernameNotFoundException WILL RENDER THE CONVERSATION UNUSABLE |
void |
removeGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
Deprecated. |
void |
removeUserFromGroup(String username,
String groupName)
Deprecated. |
void |
renameGroup(String oldName,
String newName)
Deprecated. |
Map<UUID,User> |
save(Collection<User> newInstances)
Save a collection containing new entities (persists the entities) |
UUID |
save(User user)
Save a new entity (persists the entity) |
UUID |
saveGrantedAuthority(org.springframework.security.core.GrantedAuthority grantedAuthority)
|
UUID |
saveGroup(Group group)
Deprecated. |
Map<UUID,User> |
saveOrUpdate(Collection<User> transientInstances)
Save new entities or update the persistent state of existing transient entities that have been persisted previously |
UUID |
saveOrUpdate(User transientObject)
Save a new entity or update the persistent state of an existing transient entity that has been persisted previously |
void |
setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
|
protected void |
setDao(IUserDao dao)
|
void |
setGrantedAuthorityDao(IGrantedAuthorityDao grantedAuthorityDao)
|
void |
setGroupDao(IGroupDao groupDao)
|
void |
setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
|
void |
setSaltSource(org.springframework.security.authentication.dao.SaltSource saltSource)
|
void |
setUserCache(org.springframework.security.core.userdetails.UserCache userCache)
|
UUID |
update(User user)
Update the persistent state of an existing transient entity that has been persisted previously |
void |
updateUser(org.springframework.security.core.userdetails.UserDetails user)
|
boolean |
userExists(String username)
|
| Methods inherited from class eu.etaxonomy.cdm.api.service.ServiceBase |
|---|
clear, count, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, setApplicationContext |
| 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, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows |
| Field Detail |
|---|
protected IGroupDao groupDao
protected IGrantedAuthorityDao grantedAuthorityDao
| Constructor Detail |
|---|
public UserService()
| Method Detail |
|---|
@Autowired(required=false) public void setUserCache(org.springframework.security.core.userdetails.UserCache userCache)
@Autowired(required=false) public void setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
@Autowired(required=false) public void setSaltSource(org.springframework.security.authentication.dao.SaltSource saltSource)
@Autowired(required=false) public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
@Autowired protected void setDao(IUserDao dao)
setDao in class ServiceBase<User,IUserDao>@Autowired public void setGroupDao(IGroupDao groupDao)
@Autowired public void setGrantedAuthorityDao(IGrantedAuthorityDao grantedAuthorityDao)
@Transactional(readOnly=false)
protected org.springframework.security.core.Authentication createNewAuthentication(org.springframework.security.core.Authentication currentAuth,
String newPassword)
@Transactional(readOnly=false)
@PreAuthorize(value="isAuthenticated()")
public void changePassword(String oldPassword,
String newPassword)
changePassword in interface org.springframework.security.provisioning.UserDetailsManager
@Transactional(readOnly=false)
@PreAuthorize(value="#username == authentication.name or hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public void changePasswordForUser(String username,
String newPassword)
changePasswordForUser in interface IUserService@Transactional(readOnly=false) @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public void createUser(org.springframework.security.core.userdetails.UserDetails user)
createUser in interface org.springframework.security.provisioning.UserDetailsManager@Transactional(readOnly=false) @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public void deleteUser(String username)
deleteUser in interface org.springframework.security.provisioning.UserDetailsManager@Transactional(readOnly=false) @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public void updateUser(org.springframework.security.core.userdetails.UserDetails user)
updateUser in interface org.springframework.security.provisioning.UserDetailsManagerpublic boolean userExists(String username)
userExists in interface org.springframework.security.provisioning.UserDetailsManager
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username)
throws org.springframework.security.core.userdetails.UsernameNotFoundException,
org.springframework.dao.DataAccessException
loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsServiceorg.springframework.security.core.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessExceptionUserDetailsService.loadUserByUsername(java.lang.String)
@Deprecated
@Transactional(readOnly=false)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public void addGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
addGroupAuthority in interface org.springframework.security.provisioning.GroupManager
@Deprecated
@Transactional(readOnly=false)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public void addUserToGroup(String username,
String groupName)
addUserToGroup in interface org.springframework.security.provisioning.GroupManager
@Deprecated
@Transactional(readOnly=false)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public void createGroup(String groupName,
List<org.springframework.security.core.GrantedAuthority> authorities)
createGroup in interface org.springframework.security.provisioning.GroupManager@Deprecated @Transactional(readOnly=false) @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public void deleteGroup(String groupName)
deleteGroup in interface org.springframework.security.provisioning.GroupManager@Deprecated @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public List<String> findAllGroups()
findAllGroups in interface org.springframework.security.provisioning.GroupManager@Deprecated @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public List<org.springframework.security.core.GrantedAuthority> findGroupAuthorities(String groupName)
findGroupAuthorities in interface org.springframework.security.provisioning.GroupManager@Deprecated @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public List<String> findUsersInGroup(String groupName)
findUsersInGroup in interface org.springframework.security.provisioning.GroupManager
@Deprecated
@Transactional(readOnly=false)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public void removeGroupAuthority(String groupName,
org.springframework.security.core.GrantedAuthority authority)
removeGroupAuthority in interface org.springframework.security.provisioning.GroupManager
@Deprecated
@Transactional(readOnly=false)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public void removeUserFromGroup(String username,
String groupName)
removeUserFromGroup in interface org.springframework.security.provisioning.GroupManager
@Deprecated
@Transactional(readOnly=false)
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')")
public void renameGroup(String oldName,
String newName)
renameGroup in interface org.springframework.security.provisioning.GroupManager@Transactional(readOnly=false) @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_RUN_AS_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public UUID save(User user)
IService
save in interface IService<User>save in class ServiceBase<User,IUserDao>user - the new entity to be persisted
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public UUID update(User user)
IService
update in interface IService<User>update in class ServiceBase<User,IUserDao>user - the entity to be persisted
@Transactional(readOnly=false) @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public UUID saveGrantedAuthority(org.springframework.security.core.GrantedAuthority grantedAuthority)
saveGrantedAuthority in interface IUserService@Deprecated @Transactional(readOnly=false) @PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public UUID saveGroup(Group group)
saveGroup in interface IUserService
@Transactional(readOnly=true)
public List<User> listByUsername(String queryString,
MatchMode matchmode,
List<org.hibernate.criterion.Criterion> criteria,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
IUserService
listByUsername in interface IUserServicequeryString - 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)
IIdentifiableEntityService#listByTitle(Class, String, MatchMode, List, Integer, Integer, List, List)}@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public UUID delete(User persistentObject)
IService
delete in interface IService<User>delete in class ServiceBase<User,IUserDao>persistentObject - the object to be deleted
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public Map<UUID,User> save(Collection<User> newInstances)
IService
save in interface IService<User>save in class ServiceBase<User,IUserDao>newInstances - the new entities to be persisted
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public UUID saveOrUpdate(User transientObject)
IService
saveOrUpdate in interface IService<User>saveOrUpdate in class ServiceBase<User,IUserDao>transientObject - the entity to be persisted
@PreAuthorize(value="hasRole(\'ROLE_ADMIN\') or hasRole(\'ROLE_USER_MANAGER\')") public Map<UUID,User> saveOrUpdate(Collection<User> transientInstances)
IService
saveOrUpdate in interface IService<User>saveOrUpdate in class ServiceBase<User,IUserDao>transientInstances - the entities to be persisted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||