kieker.webgui.service
Interface IUserService

All Known Implementing Classes:
UserServiceImpl

public interface IUserService

This is an interface to the service which can be used to manage the available users within the system. The methods within this interface are only accessible by administrators.

Author:
Nils Christian Ehmke

Method Summary
 void addUser(User user)
          Adds a user to the system.
 void deleteUser(User user)
          Deletes a user from the system.
 void editUserWithoutPassword(User user)
          Edits a given user, but does not change the password.
 void editUserWithPassword(User user)
          Edits a given user and changes the password as well.
 List<User> getUsers()
          Delivers a list containing the available users within the system.
 

Method Detail

addUser

@PreAuthorize(value="hasRole(\'Administrator\')")
void addUser(User user)
             throws DataAccessException
Adds a user to the system.

Parameters:
user - The domain object used to extract the necessary data to create the user. It is assumed that all fields are filled.
Throws:
DataAccessException - If it was not possible to add the user to the system. Either because a constraint was violated or because the connection to the database has somehow been damaged.

deleteUser

@PreAuthorize(value="hasRole(\'Administrator\')")
void deleteUser(User user)
                throws DataAccessException
Deletes a user from the system.

Parameters:
user - The domain object used to extract the necessary data to delete the user. It is only necessary that the name field is filled.
Throws:
DataAccessException - If it was not possible to delete the user. Either because a constraint was violated or because the connection to the database has somehow been damaged.

editUserWithPassword

@PreAuthorize(value="hasRole(\'Administrator\')")
void editUserWithPassword(User user)
                          throws DataAccessException
Edits a given user and changes the password as well.

Parameters:
user - The domain object used to extract the necessary data to edit the user. It is assumed that all fields are filled.
Throws:
DataAccessException - If it was not possible to edit the user. Either because a constraint was violated or because the connection to the database has somehow been damaged.

editUserWithoutPassword

@PreAuthorize(value="hasRole(\'Administrator\')")
void editUserWithoutPassword(User user)
                             throws DataAccessException
Edits a given user, but does not change the password.

Parameters:
user - The domain object used to extract the necessary data to edit the user. It is assumed that all fields are filled (except for the password field).
Throws:
DataAccessException - If it was not possible to edit the user. Either because a constraint was violated or because the connection to the database has somehow been damaged.

getUsers

@PreAuthorize(value="hasRole(\'Administrator\')")
List<User> getUsers()
                    throws DataAccessException
Delivers a list containing the available users within the system. The password fields of the returned domain objects will be empty. The list is always a fresh copy and can be modified at will.

Returns:
A list with the available users.
Throws:
DataAccessException - If something went wrong during the reading. This happens probably if the connection to the database has somehow been damaged.


Copyright © 2015. All rights reserved.