Uses of Class
com.osohq.oso.Exceptions.OsoException
-
Uses of Exceptions.OsoException in com.osohq.oso
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
Expected to find an FFI error to convert into a Java error but found none.static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
Generic runtime exception.static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
static class
Generic Polar Validation exception.Modifier and TypeMethodDescriptionstatic Exceptions.OsoException
Exceptions.getJavaError
(String polarError) Modifier and TypeMethodDescriptionprotected void
Ffi.Query.applicationError
(String message) void
void
Ensure that `actor` is allowed to perform `action` on `resource`.Oso.authorizedActions
(Object actor, Object resource) Oso.authorizedActions
(Object actor, Object resource, boolean allowWildcard) Determine the actions `actor` is allowed to take on `resource`.Oso.authorizedFields
(Object actor, Object action, Object resource) 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
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) Oso.getAllowedActions
(Object actor, Object resource) Return the allowed actions for the given actor and resource, if any.Oso.getAllowedActions
(Object actor, Object resource, boolean allowWildcard) Deprecated.Use `authorizedActions` instead.boolean
Check if a Java instance is an instance of a class.boolean
Submit an `allow` query to the Polar knowledge base.protected void
Ffi.Polar.load
(org.json.JSONArray sources) void
Deprecated.Polar.loadFile(String)
has been deprecated in favor ofPolar.loadFiles(String[])
as of the 0.20 release.void
Load Polar policy files.void
Polar.loadFilesFromResources
(String... filenames) Load Polar policy files from resources.void
Load a Polar string into the KB (without filename).void
Load a Polar string into the KB (with filename).static void
static void
Host.makeInstance
(String className, List<Object> initargs, long id) Make an instance of a Java class from aList<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.polarDictToJava
(org.json.JSONObject dict) Convert a JSONified Polar dictionary to a Java MapHost.polarListToJava
(org.json.JSONArray list) Convert a JSONified Polar List to a Java ListQuery for a predicate.Query for a predicate, optionally accepting expressions in the result.Query for a predicate, applying bindings and optionally accepting the expression type as a result.Query for a predicate, parsing it first.Query for a predicate, parsing it first and optionally accepting an expression.Query for a predicate, parsing it first and applying bindingsQuery for a predicate, parsing it first, applying bindings and optionally accepting an expression.Query for a rule.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
Load the given files and start the Polar REPL.protected String
Ffi.Query.source()
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.