public class CustomGrantedAuthority extends Role implements org.springframework.security.core.GrantedAuthority, Comparable<CustomGrantedAuthority>
Role wrapper with GrantedAuthority flavor.| Constructor and Description |
|---|
CustomGrantedAuthority(Role role)
Create GrantedAuthority object from given
Role |
CustomGrantedAuthority(String shortName)
Create GrantedAuthority object from minimally required field
short name of some
Role |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CustomGrantedAuthority other) |
String |
getAuthority() |
copy, equals, getFullName, getShortName, hashCode, setFullName, setShortName, toStringpublic CustomGrantedAuthority(String shortName)
RoleshortName - A role's short name to grant an authority toIllegalArgumentException - if argument is nullpublic CustomGrantedAuthority(Role role)
Rolerole - A role to grant an authority toIllegalArgumentException - if role's short name is nullpublic int compareTo(CustomGrantedAuthority other)
compareTo in interface Comparable<CustomGrantedAuthority>public String getAuthority()
getAuthority in interface org.springframework.security.core.GrantedAuthority