ResourcePermission (Apache Geode 1.13.0)
Date: 2020-09-07

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

  - ### Field Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and 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 Detail

    - #### ALL

          public static final String ALL

      See Also:
        Constant Field Values

    - #### NULL

          public static final String NULL

      See Also:
        Constant Field Values

    - #### ALL_REGIONS

          public static final String ALL_REGIONS

      Deprecated. use ALL
      See Also:
        Constant Field Values

    - #### ALL_KEYS

          public static final String ALL_KEYS

      Deprecated. use All
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### 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 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 String getResourceString()

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

    - #### getOperationString

          public String getOperationString()

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

    - #### getTarget

          public String getTarget()

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

    - #### getRegionName

          public String getRegionName()

      Deprecated. use getTarget()

    - #### getKey

          public String getKey()

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

    - #### toString

          public String toString()

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