JenaSecurity is a SecurityEvaluator interface and a set of dynamic proxies that apply that interface to Jena Graphs, Models, and associated methods and classes.
The SecurityEvaluator class must be implemented. This class provides
the interface to the authentication results (e.g.
getPrincipal()
) and the authorization system.
Factory.getInstance(
SecurityEvaluator, String, Graph );
Factory.getInstance(
SecurityEvaluator, String, Model )
ModelFactory.createModelForGraph(
SecuredGraph )
See Differences Between Graph and Model below for
reasons.
Graph
and
Model
The Graph interface does not have the concept of "update". Thus all
updates are implemented as a delete and an insert. The Model interface
does have the concept of update as evidenced by the
replace()
method in the
RDFList
class. This difference means that a
Model
created by calling
ModelFactory.createModelForGraph( SecuredGraph )
will yield a model that evaluates
Update
actions differently from one created with
Factory.getInstance( SecurityEvaluator, modelIRI, model)
.
This is the well documented case of differences between the two secured
model creation methods. For this reason it is recommended that the
model be created with the
Factory.getInsance()
method.