protected void |
Ffi.Query.applicationError(String message) |
|
void |
Oso.authorize(Object actor,
Object action,
Object resource) |
|
void |
Oso.authorize(Object actor,
Object action,
Object resource,
boolean checkRead) |
Ensure that `actor` is allowed to perform `action` on `resource`.
|
HashSet<Object> |
Oso.authorizedActions(Object actor,
Object resource) |
|
HashSet<Object> |
Oso.authorizedActions(Object actor,
Object resource,
boolean allowWildcard) |
Determine the actions `actor` is allowed to take on `resource`.
|
HashSet<Object> |
Oso.authorizedFields(Object actor,
Object action,
Object resource) |
|
HashSet<Object> |
Oso.authorizedFields(Object actor,
Object action,
Object resource,
boolean allowWildcard) |
Determine the fields of `resource` on which `actor` is allowed to perform `action`.
|
void |
Oso.authorizeField(Object actor,
Object action,
Object resource,
Object field) |
Ensure that `actor` is allowed to perform `action` on a given `resource`'s `field`.
|
void |
Oso.authorizeRequest(Object actor,
Object request) |
Ensure that `actor` is allowed to send `request` to the server.
|
protected void |
Ffi.Query.bind(String name,
String value) |
|
Long |
Host.cacheInstance(Object instance,
Long id) |
Cache an instance of a Java class.
|
protected void |
Ffi.Query.callResult(long call_id,
String value) |
|
jnr.ffi.Pointer |
Ffi.CResultPointer.check() |
|
void |
Ffi.CResultVoid.check() |
|
protected void |
Ffi.Polar.clearRules() |
|
void |
Polar.clearRules() |
Clear the rules from the KB, but maintain all registered classes and calls.
|
protected void |
Ffi.Query.debugCommand(String value) |
|
HashSet<Object> |
Oso.getAllowedActions(Object actor,
Object resource) |
Return the allowed actions for the given actor and resource, if any.
|
HashSet<Object> |
Oso.getAllowedActions(Object actor,
Object resource,
boolean allowWildcard) |
Deprecated.
|
boolean |
Host.isa(org.json.JSONObject instance,
String classTag) |
Check if a Java instance is an instance of a class.
|
boolean |
Oso.isAllowed(Object actor,
Object action,
Object resource) |
Submit an `allow` query to the Polar knowledge base.
|
protected void |
Ffi.Polar.load(org.json.JSONArray sources) |
|
void |
Polar.loadFile(String filename) |
Deprecated.
|
void |
Polar.loadFiles(String[] filenames) |
Load Polar policy files.
|
void |
Polar.loadFilesFromResources(String... filenames) |
Load Polar policy files from resources.
|
void |
Polar.loadStr(String str) |
Load a Polar string into the KB (without filename).
|
void |
Polar.loadStr(String str,
String filename) |
Load a Polar string into the KB (with filename).
|
static void |
Oso.main(String[] args) |
|
static void |
Polar.main(String[] args) |
|
Object |
Host.makeInstance(String className,
List<Object> initargs,
long id) |
Make an instance of a Java class from a List<Object> of fields.
|
protected Ffi.Query |
Ffi.Polar.newQueryFromStr(String queryStr) |
|
protected Ffi.Query |
Ffi.Polar.newQueryFromTerm(String queryTerm) |
|
protected org.json.JSONObject |
Query.nextCallResult(long callId) |
Get the next JSONified Polar result of a cached method call (enumeration).
|
protected String |
Ffi.Query.nextEvent() |
|
protected Ffi.Query |
Ffi.Polar.nextInlineQuery() |
|
protected jnr.ffi.Pointer |
Ffi.Polar.nextMessage() |
|
protected jnr.ffi.Pointer |
Ffi.Query.nextMessage() |
|
boolean |
Host.operator(String op,
List<Object> args) |
|
HashMap<String,Object> |
Host.polarDictToJava(org.json.JSONObject dict) |
Convert a JSONified Polar dictionary to a Java Map
|
List<Object> |
Host.polarListToJava(org.json.JSONArray list) |
Convert a JSONified Polar List to a Java List
|
Query |
Polar.query(Predicate query) |
Query for a predicate.
|
Query |
Polar.query(Predicate query,
boolean acceptExpression) |
Query for a predicate, optionally accepting expressions in the result.
|
Query |
Polar.query(Predicate query,
Map<String,Object> bindings,
boolean acceptExpression) |
Query for a predicate, applying bindings and optionally accepting the expression type as a
result.
|
Query |
Polar.query(String query) |
Query for a predicate, parsing it first.
|
Query |
Polar.query(String query,
boolean acceptExpression) |
Query for a predicate, parsing it first and optionally accepting an expression.
|
Query |
Polar.query(String query,
Map<String,Object> bindings) |
Query for a predicate, parsing it first and applying bindings
|
Query |
Polar.query(String query,
Map<String,Object> bindings,
boolean acceptExpression) |
Query for a predicate, parsing it first, applying bindings and optionally accepting an
expression.
|
Query |
Polar.queryRule(String rule,
Object... args) |
Query for a rule.
|
Query |
Polar.queryRule(String rule,
Map<String,Object> bindings,
Object... args) |
Query for a rule.
|
boolean |
Polar.queryRuleOnce(String rule,
Object... args) |
Query for a rule, and check if it has any results.
|
protected void |
Ffi.Query.questionResult(long call_id,
int result) |
|
void |
Polar.registerClass(Class<?> cls) |
Register a Java class with Polar.
|
void |
Polar.registerClass(Class<?> cls,
String name) |
Register a Java class with Polar using an alias.
|
protected void |
Ffi.Polar.registerConstant(String value,
String name) |
|
void |
Polar.registerConstant(Object value,
String name) |
Registers `value` as a Polar constant variable called `name`.
|
protected void |
Ffi.Polar.registerMro(String name,
String mro) |
|
void |
Polar.repl() |
Start the Polar REPL.
|
void |
Polar.repl(String[] files) |
Load the given files and start the Polar REPL.
|
protected String |
Ffi.Query.source() |
|
Object |
Host.toJava(org.json.JSONObject term) |
Turn a Polar term passed across the FFI boundary into a Java Object.
|
org.json.JSONObject |
Host.toPolarTerm(Object value) |
Convert Java Objects to Polar (JSON) terms.
|