org.keycloak.authorization.policy.evaluation

## Class DefaultEvaluation

- java.lang.Object
- - org.keycloak.authorization.policy.evaluation.DefaultEvaluation

- All Implemented Interfaces:
    Evaluation

      public class DefaultEvaluation
      extends Object
      implements Evaluation

  Author:
    Pedro Igor

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEvaluation(ResourcePermission permission, EvaluationContext executionContext, Policy parentPolicy, Policy policy, Decision decision)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deny()` Denies the requested permission.
    `EvaluationContext` | `getContext()` Returns the `PermissionEvaluator`.
    `Decision.Effect` | `getEffect()`
    `Policy` | `getParentPolicy()`
    `ResourcePermission` | `getPermission()` Returns the `ResourcePermission` to be evaluated.
    `Policy` | `getPolicy()`
    `void` | `grant()` Grants all the requested permissions to the caller.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultEvaluation

          public DefaultEvaluation(ResourcePermission permission,
                                   EvaluationContext executionContext,
                                   Policy parentPolicy,
                                   Policy policy,
                                   Decision decision)

  - ### Method Detail

    - #### getPermission

          public ResourcePermission getPermission()

      Returns the `ResourcePermission` to be evaluated.
      Specified by:
        `getPermission` in interface `Evaluation`
      Returns:
        the permission to be evaluated

    - #### getContext

          public EvaluationContext getContext()

      Returns the `PermissionEvaluator`. Which provides access to the whole evaluation runtime context.
      Specified by:
        `getContext` in interface `Evaluation`
      Returns:
        the evaluation context

    - #### grant

          public void grant()

      Grants all the requested permissions to the caller.
      Specified by:
        `grant` in interface `Evaluation`

    - #### deny

          public void deny()

      Description copied from interface: `Evaluation`
      Denies the requested permission.
      Specified by:
        `deny` in interface `Evaluation`

    - #### getPolicy

          public Policy getPolicy()

    - #### getParentPolicy

          public Policy getParentPolicy()

    - #### getEffect

          public Decision.Effect getEffect()

Copyright © 2016 JBoss by Red Hat. All rights reserved.