public interface UserService
@Inject UserService userService;
Concrete implementations do not hold any state, but it's advised to get an instance through CDI or as an EJB.| Modifier and Type | Method and Description |
|---|---|
HawkularUser |
getById(String id)
Deprecated.
Use
getById(UUID) instead |
HawkularUser |
getById(UUID id)
Retrieves an
HawkularUser based in its ID. |
HawkularUser |
getCurrent()
Retrieves the current user for the request.
|
HawkularUser |
getOrCreateById(String id)
Retrieves an
HawkularUser based on its ID. |
HawkularUser |
getOrCreateByIdAndName(String id,
String name)
Retrieves an
HawkularUser based on its ID. |
HawkularUser getCurrent()
Persona, which will be the correct choice most of the times.PersonaService.getCurrent()@Deprecated HawkularUser getById(String id)
getById(UUID) insteadHawkularUser based in its ID.id - the user IDHawkularUser getById(UUID id)
HawkularUser based in its ID.id - the user IDHawkularUser getOrCreateById(String id)
HawkularUser based on its ID. If no user is found, a new one is created and returned.id - the user IDHawkularUser instance representing the user with the given ID. It's never null.HawkularUser getOrCreateByIdAndName(String id, String name)
HawkularUser based on its ID. If no user is found, a new one is created and returned. The
name parameter is used only in case the user doesn't exist.id - the user IDname - the full name for the user. Used only if the user doesn't exist, when creating the new user.HawkularUser instance representing the user with the given ID. It's never null.Copyright © 2015 Red Hat, Inc.. All rights reserved.