org.openwms.core.service
Interface UserService

All Known Implementing Classes:
UserServiceImpl

public interface UserService

An UserService offers functionality according to the handling with Users.

Since:
0.1
Version:
$Revision: 1583 $
Author:
Heiko Scherrer
See Also:
User

Method Summary
 void changeUserPassword(UserPassword userPassword)
          Change the current Users password.
 SystemUser createSystemUser()
          Create and return the SystemUser.
 List<User> findAll()
          Find and return all Users.
 User getTemplate(String username)
          Return a transient User entity object, serving as a template.
 void remove(User user)
          Remove an User.
 User save(User user)
          Update the given User or persist it when it is a transient one.
 User saveUserProfile(User user, UserPassword userPassword, UserPreference... prefs)
          Save changes on an User and additionally save the User's password and preferences.
 void uploadImageFile(String username, byte[] image)
          Call this method to store an image for an User.
 

Method Detail

changeUserPassword

void changeUserPassword(UserPassword userPassword)
Change the current Users password.

Parameters:
userPassword - The UserPassword to change

findAll

List<User> findAll()
Find and return all Users.

Returns:
The list of all Users

uploadImageFile

void uploadImageFile(String username,
                     byte[] image)
Call this method to store an image for an User.

Parameters:
username - Username of the User
image - Image to be stored

getTemplate

User getTemplate(String username)
Return a transient User entity object, serving as a template.

Parameters:
username - Username of the User
Returns:
An empty User template

save

User save(User user)
Update the given User or persist it when it is a transient one.

Parameters:
user - User entity to save
Returns:
Saved User instance

saveUserProfile

User saveUserProfile(User user,
                     UserPassword userPassword,
                     UserPreference... prefs)
Save changes on an User and additionally save the User's password and preferences.

Parameters:
user - The User to change
userPassword - The Users password
prefs - An array of UserPreference objects
Returns:
The saved User instance

remove

void remove(User user)
Remove an User.

Parameters:
user - User to be removed

createSystemUser

SystemUser createSystemUser()
Create and return the SystemUser.

Returns:
the SystemUser instance


Copyright © 2005-2011 openwms.org. All Rights Reserved.