@PermitAll public class PersonaServiceImpl extends Object implements PersonaService
PersonaService. Consumers should get an instance of this
via CDI. This class should not be directly instantiated by the consumers.| Constructor and Description |
|---|
PersonaServiceImpl() |
| 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.
|
public Persona get(String id)
PersonaServicePersona based on a given ID.get in interface PersonaServiceid - the persona's IDpublic Set<Role> getEffectiveRolesForResource(Persona persona, Resource resource)
PersonaServicegetEffectiveRolesForResource in interface PersonaServicepersona - the personaresource - the resource@Produces public Persona getCurrent()
PersonaServicePersona for this request.getCurrent in interface PersonaServicepublic boolean isAllowedToImpersonate(HawkularUser actual, Persona toImpersonate)
PersonaServiceisAllowedToImpersonate in interface PersonaServiceactual - the logged in usertoImpersonate - the persona to be impersonatedCopyright © 2015 Red Hat, Inc.. All rights reserved.