Class PrivilegeEvaluatorContext

    • Constructor Detail

      • PrivilegeEvaluatorContext

        public PrivilegeEvaluatorContext​(String realm,
                                         String resourceName,
                                         String applicationName)
        Creates a new Privilege Evaluator Context
        Parameters:
        realm - The realm of the policy evaluation
        resourceName - The resource being evaluated
        applicationName - The application being evaluated
    • Method Detail

      • getCurrent

        public static PrivilegeEvaluatorContext getCurrent()
        Returns the current context of the running thread
        Returns:
        object containing the current context
      • setCurrent

        public static void setCurrent​(PrivilegeEvaluatorContext ctx)
        Set the current context of the running thread
      • getRealm

        public String getRealm()
        Return the realm
        Returns:
        The realm
      • getResourceName

        public String getResourceName()
        Return the resource name
        Returns:
        The resource name
      • getApplicationName

        public String getApplicationName()
        Return the application name
        Returns:
        The application name
      • setAttribute

        public void setAttribute​(String key,
                                 Object value)
        Set an attribute on the context
        Parameters:
        key - The key of the attribute
        value - The value
      • getAttribute

        public Object getAttribute​(String key)
        Fetch an attribute from the map
        Parameters:
        key - The key of the attribute
        Returns:
        The value
      • getConditionDecisionCache

        public Map<String,​ConditionDecision> getConditionDecisionCache()
        Return the condition decision cache.
        Returns:
        the condition decision cache.