public interface PersonaService
Persona. Can be injected via CDI into managed beans as
follows:
@Inject PersonaService personaService;
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 |
|---|---|
Persona |
get(String id)
Retrieves an
Persona based on a given ID. |
Persona |
getCurrent()
Retrieves the current
Persona for this request. |
Set<Role> |
getEffectiveRolesForResource(Persona persona,
Resource resource)
Retrieves the effective role of a Persona on a given Resource.
|
boolean |
isAllowedToImpersonate(HawkularUser actual,
Persona toImpersonate)
Checks if the current user is allowed to impersonate the given persona.
|
Persona get(String id)
Persona based on a given ID.id - the persona's IDIllegalArgumentException - if the ID is nullSet<Role> getEffectiveRolesForResource(Persona persona, Resource resource)
persona - the personaresource - the resourcePersona getCurrent()
Persona for this request.boolean isAllowedToImpersonate(HawkularUser actual, Persona toImpersonate)
actual - the logged in usertoImpersonate - the persona to be impersonatedCopyright © 2015 Red Hat, Inc.. All rights reserved.