org.apache.shiro.authz
Class SimpleRole
java.lang.Object
org.apache.shiro.authz.SimpleRole
- All Implemented Interfaces:
- Serializable
public class SimpleRole
- extends Object
- implements Serializable
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
name
protected String name
permissions
protected Set<Permission> permissions
SimpleRole
public SimpleRole()
SimpleRole
public SimpleRole(String name)
SimpleRole
public SimpleRole(String name,
Set<Permission> permissions)
getName
public String getName()
setName
public void setName(String name)
getPermissions
public Set<Permission> getPermissions()
setPermissions
public void setPermissions(Set<Permission> permissions)
add
public void add(Permission permission)
addAll
public void addAll(Collection<Permission> perms)
isPermitted
public boolean isPermitted(Permission p)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.