org.apache.geode.security

## Class ResourcePermission

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

- All Implemented Interfaces:
    java.io.Serializable, org.apache.shiro.authz.Permission

      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 and Description
    --- | ---
    `static class` | `ResourcePermission.Operation`
    `static class` | `ResourcePermission.Resource`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ALL_KEYS`
    `static java.lang.String` | `ALL_REGIONS`

    - ### 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 and Description
    `ResourcePermission()`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation)`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, java.lang.String regionName)`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, java.lang.String regionName, java.lang.String key)`
    `ResourcePermission(java.lang.String resource, java.lang.String operation)`
    `ResourcePermission(java.lang.String resource, java.lang.String operation, java.lang.String regionName)`
    `ResourcePermission(java.lang.String resource, java.lang.String operation, java.lang.String regionName, java.lang.String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getKey()` returns the key, could be "*" meaning all keys.
    `ResourcePermission.Operation` | `getOperation()` Returns the operation, could be either MANAGE, WRITE or READ
    `java.lang.String` | `getRegionName()` returns the regionName, could be "*", meaning all regions
    `ResourcePermission.Resource` | `getResource()` Returns the resource, could be either DATA or CLUSTER
    `java.lang.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 Detail

    - #### ALL_REGIONS

          public static java.lang.String ALL_REGIONS

    - #### ALL_KEYS

          public static java.lang.String ALL_KEYS

  - ### Constructor Detail

    - #### ResourcePermission

          public ResourcePermission()

    - #### ResourcePermission

          public ResourcePermission(java.lang.String resource,
                                    java.lang.String operation)

    - #### ResourcePermission

          public ResourcePermission(java.lang.String resource,
                                    java.lang.String operation,
                                    java.lang.String regionName)

    - #### ResourcePermission

          public ResourcePermission(java.lang.String resource,
                                    java.lang.String operation,
                                    java.lang.String regionName,
                                    java.lang.String key)

    - #### ResourcePermission

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

    - #### ResourcePermission

          public ResourcePermission(ResourcePermission.Resource resource,
                                    ResourcePermission.Operation operation,
                                    java.lang.String regionName)

    - #### ResourcePermission

          public ResourcePermission(ResourcePermission.Resource resource,
                                    ResourcePermission.Operation operation,
                                    java.lang.String regionName,
                                    java.lang.String key)

  - ### Method Detail

    - #### getResource

          public ResourcePermission.Resource getResource()

      Returns the resource, could be either DATA or CLUSTER

    - #### getOperation

          public ResourcePermission.Operation getOperation()

      Returns the operation, could be either MANAGE, WRITE or READ

    - #### getRegionName

          public java.lang.String getRegionName()

      returns the regionName, could be "*", meaning all regions

    - #### getKey

          public java.lang.String getKey()

      returns the key, could be "*" meaning all keys.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `org.apache.shiro.authz.permission.WildcardPermission`