public interface RoleService
Role. Can be injected via CDI into managed beans as follows:
@Inject RoleService roleService;
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 |
|---|---|
Role |
create(String name,
String description)
Creates a new Role based on the given name and description.
|
Role |
getById(UUID id)
Retrieves the persistent Role based on its ID.
|
Role |
getByName(String name)
Retrieves the persistent Role based on its fixed name.
|
Set<Role> |
getImplicitPermittedRoles(Role role)
Following Wildfly's definition of roles, this method returns all roles that are implicit from the given role from
the perspective of an operation.
|
Set<Role> |
getImplicitPermittedRoles(String name)
Following Wildfly's definition of roles, this method returns all roles that are implicit from the given role from
the perspective of an operation.
|
Set<Role> |
getImplicitUserRoles(Role role)
Following Wildfly's definition of roles, this method returns all roles that are implicit from the given role from
the User's perspective (ie: user has the given role).
|
Set<Role> |
getImplicitUserRoles(String name)
Following Wildfly's definition of roles, this method returns all roles that are implicit from the given role from
the User's perspective (ie: user has the given role).
|
Role |
getOrCreateByName(String name,
String description)
Retrieves a Role based on the given name.
|
Role |
produceRoleByName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
CDI producer method for Role beans annotated with
NamedRole. |
Role create(String name, String description)
name - the role's name. Must be unique and non-nulldescription - free text, can be nullRole getById(UUID id)
id - the role IDRole getByName(String name)
name - the common name for the role.Set<Role> getImplicitUserRoles(String name)
name - the "top of hierarchy" role to get the incorporated roles fromgetImplicitUserRoles(Role)Set<Role> getImplicitUserRoles(Role role)
role - the "top of hierarchy" role to get the incorporated roles fromSet<Role> getImplicitPermittedRoles(String name)
name - the "top of hierarchy" role to get the incorporated roles fromSet<Role> getImplicitPermittedRoles(Role role)
role - the "top of hierarchy" role to get the incorporated roles fromRole produceRoleByName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
NamedRole. This method is not intended to be called by
consumers of the API.injectionPoint - the CDI InjectionPointRole getOrCreateByName(String name, String description)
name - the name to use in the lookup of the Roledescription - a description to use, in case the role doesn't exist yetCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.