Package org.apache.shiro.authz
Class SimpleRole
-
- org.apache.shiro.authz.SimpleRole
-
- All Implemented Interfaces:
public class SimpleRole extends implements
A simple representation of a security role that has a name and a collection of permissions. This object can be used internally by Realms to maintain authorization state.- Since:
- 0.2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected
name
protected <Permission>
permissions
-
Constructor Summary
Constructors Constructor Description SimpleRole()
name)
name, <Permission> permissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Permission permission)
void
<Permission> perms)
boolean
o)
getName()
<Permission>
getPermissions()
int
hashCode()
boolean
isPermitted(Permission p)
void
name)
void
<Permission> permissions)
toString()
-
-
-
Field Detail
-
name
protected name
-
permissions
protected <Permission> permissions
-
-
Constructor Detail
-
SimpleRole
public SimpleRole()
-
SimpleRole
public SimpleRole( name)
-
SimpleRole
public SimpleRole( name, <Permission> permissions)
-
-
Method Detail
-
getName
public getName()
-
setName
public void setName( name)
-
getPermissions
public <Permission> getPermissions()
-
setPermissions
public void setPermissions(<Permission> permissions)
-
add
public void add(Permission permission)
-
addAll
public void addAll(<Permission> perms)
-
isPermitted
public boolean isPermitted(Permission p)
-
hashCode
public int hashCode()
- Overrides:
in class
-
equals
public boolean equals( o)
- Overrides:
in class
-
toString
public toString()
- Overrides:
in class
-
-