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`
    `static class` | `ResourcePermission.Target`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ALL`
    `static java.lang.String` | `ALL_KEYS` Deprecated. use All
    `static java.lang.String` | `ALL_REGIONS` Deprecated. use ALL
    `static java.lang.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 and Description
    `ResourcePermission()`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation)`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, ResourcePermission.Target target)`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, ResourcePermission.Target target, java.lang.String key)`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, java.lang.String target)`
    `ResourcePermission(ResourcePermission.Resource resource, ResourcePermission.Operation operation, java.lang.String target, 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 target)`
    `ResourcePermission(java.lang.String resource, java.lang.String operation, java.lang.String target, java.lang.String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated 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 ALL, NULL, MANAGE, WRITE or READ
    `java.lang.String` | `getOperationString()` Returns the operation, could be either "*", "NULL", "MANAGE", "WRITE" or "READ"
    `java.lang.String` | `getRegionName()` Deprecated. use getTarget()
    `ResourcePermission.Resource` | `getResource()` Returns the resource, could be either ALL, NULL, DATA or CLUSTER
    `java.lang.String` | `getResourceString()` could be either "*", "NULL", "DATA", "CLUSTER"
    `java.lang.String` | `getTarget()` returns the regionName, or cluster target, could be "*", meaning all regions or all targets
    `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

          public static java.lang.String ALL

    - #### NULL

          public static java.lang.String NULL

    - #### ALL_REGIONS

          public static java.lang.String ALL_REGIONS

      Deprecated. use ALL

    - #### ALL_KEYS

          public static java.lang.String ALL_KEYS

      Deprecated. use All

  - ### Constructor Detail

    - #### ResourcePermission

          public ResourcePermission()

    - #### ResourcePermission

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

    - #### ResourcePermission

          public ResourcePermission(ResourcePermission.Resource resource,
                                    ResourcePermission.Operation operation,
                                    java.lang.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,
                                    java.lang.String key)

    - #### ResourcePermission

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

    - #### 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 target)

    - #### ResourcePermission

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

  - ### Method Detail

    - #### getResource

          public ResourcePermission.Resource getResource()

      Returns the resource, could be either ALL, NULL, DATA or CLUSTER

    - #### getOperation

          public ResourcePermission.Operation getOperation()

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

    - #### getResourceString

          public java.lang.String getResourceString()

      could be either "*", "NULL", "DATA", "CLUSTER"

    - #### getOperationString

          public java.lang.String getOperationString()

      Returns the operation, could be either "*", "NULL", "MANAGE", "WRITE" or "READ"

    - #### getTarget

          public java.lang.String getTarget()

      returns the regionName, or cluster target, could be "*", meaning all regions or all targets

    - #### getRegionName

          public java.lang.String getRegionName()

      Deprecated. use getTarget()

    - #### 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`