Package io.jans.as.model.uma
Class JsonLogic
- java.lang.Object
-
- io.jans.as.model.uma.JsonLogic
-
public class JsonLogic extends Object
- Author:
- yuriyz
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
apply(String rule)
static boolean
apply(String rule, String data)
static Object
applyObject(String rule)
static Object
applyObject(String rule, String data)
static Object
eval(String script)
ScriptEngine
getEngine()
static JsonLogic
getInstance()
Invocable
getInvocable()
static Object
invokeFunction(String name, Object... args)
-
-
-
Method Detail
-
getInstance
public static JsonLogic getInstance()
-
getEngine
public ScriptEngine getEngine()
-
getInvocable
public Invocable getInvocable()
-
eval
public static Object eval(String script) throws ScriptException
- Throws:
ScriptException
-
invokeFunction
public static Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException
- Throws:
ScriptException
NoSuchMethodException
-
apply
public static boolean apply(String rule) throws ScriptException
- Throws:
ScriptException
-
apply
public static boolean apply(String rule, String data) throws ScriptException
- Throws:
ScriptException
-
applyObject
public static Object applyObject(String rule) throws ScriptException
- Throws:
ScriptException
-
applyObject
public static Object applyObject(String rule, String data) throws ScriptException
- Throws:
ScriptException
-
-