org.apache.shiro.authz.permission
Class DomainPermission

java.lang.Object
  extended by org.apache.shiro.authz.permission.WildcardPermission
      extended by 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
  DomainPermission()
          Creates a domain permission with *all* actions for *all* targets;
protected DomainPermission(Set<String> actions, Set<String> targets)
           
  DomainPermission(String actions)
           
  DomainPermission(String actions, String targets)
           
 
Method Summary
 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)
           
 
Methods inherited from class org.apache.shiro.authz.permission.WildcardPermission
equals, getParts, hashCode, implies, setParts, setParts, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DomainPermission

public DomainPermission()
Creates a domain permission with *all* actions for *all* targets;


DomainPermission

public DomainPermission(String actions)

DomainPermission

public DomainPermission(String actions,
                        String targets)

DomainPermission

protected DomainPermission(Set<String> actions,
                           Set<String> targets)
Method Detail

setParts

protected void setParts(String domain,
                        Set<String> actions,
                        Set<String> targets)

getDomain

protected String getDomain(Class<? extends DomainPermission> clazz)

getDomain

public String getDomain()

setDomain

protected void setDomain(String domain)

getActions

public Set<String> getActions()

setActions

protected void setActions(Set<String> actions)

getTargets

public Set<String> getTargets()

setTargets

protected void setTargets(Set<String> targets)


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.