Class DomainPermission
- java.lang.Object
-
- org.apache.shiro.authz.permission.WildcardPermission
-
- org.apache.shiro.authz.permission.DomainPermission
-
- All Implemented Interfaces:
Serializable
,Permission
public class DomainPermission extends WildcardPermission
Provides a base Permission class from which type-safe/domain-specific subclasses may extend. Can be used as a base class for JPA/Hibernate persisted permissions that wish to store the parts of the permission string in separate columns (e.g. 'domain', 'actions' and 'targets' columns), which can be used in querying strategies.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.shiro.authz.permission.WildcardPermission
DEFAULT_CASE_SENSITIVE, PART_DIVIDER_TOKEN, SUBPART_DIVIDER_TOKEN, WILDCARD_TOKEN
-
-
Constructor Summary
Constructors Modifier Constructor Description DomainPermission()
Creates a domain permission with *all* actions for *all* targets;DomainPermission(String actions)
DomainPermission(String actions, String targets)
protected
DomainPermission(Set<String> actions, Set<String> targets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getActions()
String
getDomain()
protected String
getDomain(Class<? extends DomainPermission> clazz)
Set<String>
getTargets()
protected void
setActions(Set<String> actions)
protected void
setDomain(String domain)
protected void
setParts(String domain, Set<String> actions, Set<String> targets)
protected void
setTargets(Set<String> targets)
-
-
-
Constructor Detail
-
DomainPermission
public DomainPermission()
Creates a domain permission with *all* actions for *all* targets;
-
DomainPermission
public DomainPermission(String actions)
-
-
Method Detail
-
getDomain
protected String getDomain(Class<? extends DomainPermission> clazz)
-
getDomain
public String getDomain()
-
setDomain
protected void setDomain(String domain)
-
-