|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Transactional public interface UserManager
A manager of User. Provides methods to create, retrieve, delete or update User and to manage role group related to User. Method arguments must be non null, unless the contrary is explicitly specified.
| Method Summary | |
|---|---|
void |
addRoleGroup(java.lang.String idUser,
java.lang.String idRoleGroup)
Add the role group matching the given idRoleGroup to the user matching the given idUser |
java.lang.String |
createUser(UserTO userTO)
Add a new User in registry. |
java.util.List<UserTO> |
getAllUser()
Return the list of all users in the registry |
UserTO |
getUser(java.lang.String userId)
Retrieve the user matching the given name |
UserTO |
getUserByLogin(java.lang.String login)
Retrieve the user matching the given login |
java.util.List<UserTO> |
getUserNotInRoleGroup(java.lang.String idRoleGroup)
Return the list of users associate with role group |
void |
init()
Create default users if they don't exist in database |
void |
removeRoleGroup(java.lang.String idUser,
java.lang.String idRoleGroup)
Remove the role group matching the given idRoleGroup from the list of role groups of the user matching the given idUser. |
void |
removeUser(java.lang.String userId)
Remove the user matching the given id from the registry. |
java.lang.String |
updateUser(UserTO userTO)
Update the user in the registry. |
| Method Detail |
|---|
void init()
throws java.io.IOException,
RoleGroupException
java.io.IOException
RoleGroupException
java.lang.String createUser(UserTO userTO)
throws UserException
userTO - the UserTO handling data of the User to create
User
UserException - if you try to create an user with name that already exists or
an user without name
@Transactional(readOnly=true)
java.util.List<UserTO> getAllUser()
throws UserException
List of all UserTO in the registry, couldn't
be null, can be empty
UserException
@Transactional(readOnly=true)
java.util.List<UserTO> getUserNotInRoleGroup(java.lang.String idRoleGroup)
throws UserException
idRoleGroup - an RoleGroup id
List of UserTO associate with
RoleGroup, couldn't be null, can be empty
UserException
@Transactional(readOnly=true)
UserTO getUser(java.lang.String userId)
throws UserException
userName - an User name
UserTO handling data of the User that matches
the given id
UserException - if no role group found for the given name
@Transactional(readOnly=true)
UserTO getUserByLogin(java.lang.String login)
throws UserException
login - an User login
UserTO handling data of the User that matches
the given id
UserException - if no role group found for the given name
void removeUser(java.lang.String userId)
throws UserException
userId - an User id
UserException
java.lang.String updateUser(UserTO userTO)
throws UserException
userTO - the UserTO handling data of the User to update
UserException - if an error occurs during user update : user to update
doesn't exist or have the same name as an other registered
user
void addRoleGroup(java.lang.String idUser,
java.lang.String idRoleGroup)
throws UserException
idUser - an User ididRoleGroup - a RoleGroup id
UserException - if at least one of the given id doesn't exist in database
void removeRoleGroup(java.lang.String idUser,
java.lang.String idRoleGroup)
throws UserException
idUser - an User ididRoleGroup - a RoleGroup id
UserException - if no organization found for the given id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||