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)
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 getCurrent()
Persona, which will be the correct choice most of the times.PersonaService.getCurrent()HawkularUser getById(String 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.Copyright © 2015 Red Hat, Inc.. All rights reserved.