Class FunctionMap

java.lang.Object
org.casbin.jcasbin.model.FunctionMap

public class FunctionMap extends Object
FunctionMap represents the collection of Function.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Map<String,com.googlecode.aviator.runtime.type.AviatorFunction>
    AviatorFunction represents a function that is used in the matchers, used to get attributes in ABAC.
    boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFunction(String name, com.googlecode.aviator.runtime.type.AviatorFunction function)
    addFunction adds an expression function.
    loadFunctionMap loads an initial function map.
    void
    setAviatorEval(com.googlecode.aviator.AviatorEvaluatorInstance aviatorEval)
    setAviatorEval adds AviatorEvaluatorInstance to all the custom function.
    void
    setAviatorEval(String name, com.googlecode.aviator.AviatorEvaluatorInstance aviatorEval)
    setAviatorEval adds AviatorEvaluatorInstance to the custom function.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • fm

      public Map<String,com.googlecode.aviator.runtime.type.AviatorFunction> fm
      AviatorFunction represents a function that is used in the matchers, used to get attributes in ABAC.
    • isModify

      public boolean isModify
  • Constructor Details

    • FunctionMap

      public FunctionMap()
  • Method Details

    • addFunction

      public void addFunction(String name, com.googlecode.aviator.runtime.type.AviatorFunction function)
      addFunction adds an expression function.
      Parameters:
      name - the name of the new function.
      function - the function.
    • setAviatorEval

      public void setAviatorEval(String name, com.googlecode.aviator.AviatorEvaluatorInstance aviatorEval)
      setAviatorEval adds AviatorEvaluatorInstance to the custom function.
      Parameters:
      name - the name of the custom function.
      aviatorEval - the AviatorEvaluatorInstance object.
    • setAviatorEval

      public void setAviatorEval(com.googlecode.aviator.AviatorEvaluatorInstance aviatorEval)
      setAviatorEval adds AviatorEvaluatorInstance to all the custom function.
      Parameters:
      aviatorEval - the AviatorEvaluatorInstance object.
    • loadFunctionMap

      public static FunctionMap loadFunctionMap()
      loadFunctionMap loads an initial function map.
      Returns:
      the constructor of FunctionMap.