ResourcePermission (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.security, class: ResourcePermission

Package org.apache.geode.security

# Class ResourcePermission

java.lang.Object
org.apache.shiro.authz.permission.WildcardPermission
org.apache.geode.security.ResourcePermission

All Implemented Interfaces:
  `Serializable`, `org.apache.shiro.authz.Permission`

@Immutable public class ResourcePermission extends org.apache.shiro.authz.permission.WildcardPermission
ResourcePermission defines the resource, the operation, the region and the key involved in the action to be authorized. It is passed to the SecurityManager for the implementation to decide whether to grant a user this permission or not.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `ResourcePermission.Operation`
  `static enum`
  `ResourcePermission.Resource`
  `static enum`
  `ResourcePermission.Target`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ALL`
  `static final String`
  `ALL_KEYS`
  Deprecated.
  use All
  `static final String`
  `ALL_REGIONS`
  Deprecated.
  use ALL
  `static final String`
  `NULL`

  ### Fields inherited from class org.apache.shiro.authz.permission.WildcardPermission

  `DEFAULT_CASE_SENSITIVE, PART_DIVIDER_TOKEN, SUBPART_DIVIDER_TOKEN, WILDCARD_TOKEN`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourcePermission()`
  `ResourcePermission(String resource, String operation)`
  `ResourcePermission(String resource, String operation, String target)`
  `ResourcePermission(String resource, String operation, String target, String key)`
  `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation)`
  `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, String target)`
  `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, String target, String key)`
  `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, ResourcePermission.Target target)`
  `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, ResourcePermission.Target target, String key)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getKey()`
  returns the key, could be "*" meaning all keys.
  `ResourcePermission.Operation`
  `getOperation()`
  Returns the operation, could be either ALL, NULL, MANAGE, WRITE or READ
  `String`
  `getOperationString()`
  Returns the operation, could be either "*", "NULL", "MANAGE", "WRITE" or "READ"
  `String`
  `getRegionName()`
  Deprecated.
  use getTarget()
  `ResourcePermission.Resource`
  `getResource()`
  Returns the resource, could be either ALL, NULL, DATA or CLUSTER
  `String`
  `getResourceString()`
  could be either "*", "NULL", "DATA", "CLUSTER"
  `String`
  `getTarget()`
  returns the regionName, or cluster target, could be "*", meaning all regions or all targets
  `String`
  `toString()`

  ### Methods inherited from class org.apache.shiro.authz.permission.WildcardPermission

  `equals, getParts, hashCode, implies, setParts, setParts, setParts`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ALL

    public static final String ALL
    See Also:
      - Constant Field Values

  - ### NULL

    public static final String NULL
    See Also:
      - Constant Field Values

  - ### ALL_REGIONS

    @Deprecated public static final String ALL_REGIONS
    Deprecated.
    use ALL
    See Also:
      - Constant Field Values

  - ### ALL_KEYS

    @Deprecated public static final String ALL_KEYS
    Deprecated.
    use All
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ResourcePermission

    public ResourcePermission()

  - ### ResourcePermission

    public ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation)

  - ### ResourcePermission

    public ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, String target)

  - ### ResourcePermission

    public ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, ResourcePermission.Target target)

  - ### ResourcePermission

    public ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, ResourcePermission.Target target, String key)

  - ### ResourcePermission

    public ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, String target, String key)

  - ### ResourcePermission

    public ResourcePermission(String resource, String operation)

  - ### ResourcePermission

    public ResourcePermission(String resource, String operation, String target)

  - ### ResourcePermission

    public ResourcePermission(String resource, String operation, String target, String key)

- ## Method Details

  - ### getResource

    public ResourcePermission.Resource getResource()
    Returns the resource, could be either ALL, NULL, DATA or CLUSTER
    Returns:
      the resource as a `ResourcePermission.Resource`

  - ### getOperation

    public ResourcePermission.Operation getOperation()
    Returns the operation, could be either ALL, NULL, MANAGE, WRITE or READ
    Returns:
      the operation as an `ResourcePermission.Operation`

  - ### getResourceString

    public String getResourceString()
    could be either "*", "NULL", "DATA", "CLUSTER"
    Returns:
      the resource as a String

  - ### getOperationString

    public String getOperationString()
    Returns the operation, could be either "*", "NULL", "MANAGE", "WRITE" or "READ"
    Returns:
      the operation as a String

  - ### getTarget

    public String getTarget()
    returns the regionName, or cluster target, could be "*", meaning all regions or all targets
    Returns:
      the regionName, or cluster target

  - ### getRegionName

    @Deprecated public String getRegionName()
    Deprecated.
    use getTarget()
    Returns:
      the regionName, or cluster target

  - ### getKey

    public String getKey()
    returns the key, could be "*" meaning all keys.
    Returns:
      the key

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `org.apache.shiro.authz.permission.WildcardPermission`