public class Role extends Object implements Serializable
Constructor and Description |
---|
Role(String name)
Constructor with name
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getName() |
Set<Permission> |
getPermissions() |
Collection<Scope> |
getScopes() |
<S extends Scope> |
getScopesByType(Class<S> scopeType)
Filters the scopes corresponding to a type
|
int |
hashCode() |
static Role |
unmodifiableRole(Role role)
Convenient method to get an unmodifiable role from a role
|
public Role(String name)
name
- the namepublic static Role unmodifiableRole(Role role)
role
- the role to protectpublic String getName()
public Collection<Scope> getScopes()
public Set<Permission> getPermissions()
public <S extends Scope> Set<S> getScopesByType(Class<S> scopeType)
S
- the type of the scope to filter.scopeType
- the type of scopeCopyright © 2013-2018–2019 SeedStack. All rights reserved.