Package org.casbin.jcasbin.model
Class FunctionMap
java.lang.Object
org.casbin.jcasbin.model.FunctionMap
FunctionMap represents the collection of Function.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFunction
(String name, com.googlecode.aviator.runtime.type.AviatorFunction function) addFunction adds an expression function.static FunctionMap
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.
-
Field Details
-
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
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
loadFunctionMap loads an initial function map.- Returns:
- the constructor of FunctionMap.
-