org.ikasan.framework.security.service
Interface UserService

All Superinterfaces:
org.springframework.security.userdetails.UserDetailsManager, org.springframework.security.userdetails.UserDetailsService
All Known Implementing Classes:
UserServiceImpl

public interface UserService
extends org.springframework.security.userdetails.UserDetailsManager

User and Authority service interface

Author:
Ikasan Development Team

Method Summary
 void changeUsersEmail(String username, String newEmail)
          Allows a specified user's email address.
 void changeUsersPassword(String username, String newPassword, String confirmNewPassword)
          Allows a specified user's password.
 void createAuthority(Authority newAuthority)
          Creates a new Authority on the system
 void disableUser(String username)
          Disables the specified user
 void enableUser(String username)
          Enables the specified user
 List<Authority> getAuthorities()
          Gets all Authorities in the system
 List<User> getUsers()
          Gets all Users in the system
 void grantAuthority(String username, String authority)
          Attempts to grant an authority to a user
 User loadUserByUsername(String username)
           
 void revokeAuthority(String username, String authority)
          Attempts to revoke an authority from a user
 
Methods inherited from interface org.springframework.security.userdetails.UserDetailsManager
changePassword, createUser, deleteUser, updateUser, userExists
 

Method Detail

getUsers

List<User> getUsers()
Gets all Users in the system

Returns:
all Users

getAuthorities

List<Authority> getAuthorities()
Gets all Authorities in the system

Returns:
all Authorities

loadUserByUsername

User loadUserByUsername(String username)
                        throws org.springframework.security.userdetails.UsernameNotFoundException,
                               org.springframework.dao.DataAccessException
Specified by:
loadUserByUsername in interface org.springframework.security.userdetails.UserDetailsService
Throws:
org.springframework.security.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException

grantAuthority

void grantAuthority(String username,
                    String authority)
Attempts to grant an authority to a user

Parameters:
username -
authority -
Throws:
IllegalArgumentException - - if the user already has the authority

revokeAuthority

void revokeAuthority(String username,
                     String authority)
Attempts to revoke an authority from a user

Parameters:
username -
authority -
Throws:
IllegalArgumentException - - if the user does not hold the authority

changeUsersPassword

void changeUsersPassword(String username,
                         String newPassword,
                         String confirmNewPassword)
                         throws IllegalArgumentException
Allows a specified user's password. Note that this should be an administrator function or a function of that particular user

Parameters:
username -
newPassword - as plain text
confirmNewPassword - as plain text
Throws:
IllegalArgumentException - If the passwords don't match

changeUsersEmail

void changeUsersEmail(String username,
                      String newEmail)
                      throws IllegalArgumentException
Allows a specified user's email address. Note that this should be an administrator function or a function of that particular user

Parameters:
username -
newEmail - as plain text
Throws:
IllegalArgumentException - If the user is not valid

disableUser

void disableUser(String username)
Disables the specified user

Parameters:
username -
Throws:
IllegalArgumentException - - if the specified user does not exist

enableUser

void enableUser(String username)
Enables the specified user

Parameters:
username -
Throws:
IllegalArgumentException - - if the specified user does not exist

createAuthority

void createAuthority(Authority newAuthority)
Creates a new Authority on the system

Parameters:
newAuthority -


Copyright © 2007-2012 Ikasan. All Rights Reserved.