Interface SecurityContext

All Known Implementing Classes:
SecurityContextAllowAll, SecurityContextAllowNamedGraphs, SecurityContextAllowNone, SecurityContextView

public interface SecurityContext
A SecurityContext is the things actor (user, role) is allowed to do. Currently version: the set of graphs, by graph name, they can access. It can be inverted into a "deny" policy with Predicate.negate().
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SecurityContext
     
    static final org.apache.jena.graph.Node
     
    static final org.apache.jena.graph.Node
     
    static final org.apache.jena.graph.Node
     
    static final org.apache.jena.graph.Node
     
    static final SecurityContext
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ALL_NG(org.apache.jena.sparql.core.DatasetGraph dsg)
     
    default org.apache.jena.query.QueryExecution
    createQueryExecution(String queryString, org.apache.jena.sparql.core.DatasetGraph dsg)
     
    org.apache.jena.query.QueryExecution
    createQueryExecution(org.apache.jena.query.Query query, org.apache.jena.sparql.core.DatasetGraph dsg)
     
    default void
    filterTDB(org.apache.jena.sparql.core.DatasetGraph dsg, org.apache.jena.query.QueryExecution qExec)
    Apply a filter suitable for the TDB-backed DatasetGraph, to the Context of the QueryExecution.
    Predicate<org.apache.jena.sparql.core.Quad>
    Quad filter to reflect the security policy of this SecurityContext.
    boolean
     
    Collection of visible graph URI names.
    Collection<org.apache.jena.graph.Node>
    Collection of visible graph names.
  • Field Details

    • NONE

      static final SecurityContext NONE
    • ALL

      static final SecurityContext ALL
    • allGraphs

      static final org.apache.jena.graph.Node allGraphs
    • allNamedGraphs

      static final org.apache.jena.graph.Node allNamedGraphs
    • allNamedGraphsStr

      static final org.apache.jena.graph.Node allNamedGraphsStr
    • allGraphsStr

      static final org.apache.jena.graph.Node allGraphsStr
  • Method Details

    • ALL_NG

      static SecurityContext ALL_NG(org.apache.jena.sparql.core.DatasetGraph dsg)
    • visibleGraphs

      Collection<org.apache.jena.graph.Node> visibleGraphs()
      Collection of visible graph names.

      This method returns null for "all" to avoid needing to calculate the current set of named graph names. A collection of no elements means no named graphs are visible.

    • visibleGraphNames

      default Collection<String> visibleGraphNames()
      Collection of visible graph URI names.

      This method returns null for "all" to avoid needing to calculate the current set of named graph names. A collection of no elements means no named graphs are visible.

    • visableDefaultGraph

      boolean visableDefaultGraph()
    • createQueryExecution

      default org.apache.jena.query.QueryExecution createQueryExecution(String queryString, org.apache.jena.sparql.core.DatasetGraph dsg)
    • createQueryExecution

      org.apache.jena.query.QueryExecution createQueryExecution(org.apache.jena.query.Query query, org.apache.jena.sparql.core.DatasetGraph dsg)
    • predicateQuad

      Predicate<org.apache.jena.sparql.core.Quad> predicateQuad()
      Quad filter to reflect the security policy of this SecurityContext. It is better to call createQueryExecution(Query, DatasetGraph) which may be more efficient.
    • filterTDB

      default void filterTDB(org.apache.jena.sparql.core.DatasetGraph dsg, org.apache.jena.query.QueryExecution qExec)
      Apply a filter suitable for the TDB-backed DatasetGraph, to the Context of the QueryExecution. This does not modify the DatasetGraph. Throws IllegalArgumentException if DatasetGraph is not a TDB1 or TDB2 backed dataset. May throw UnsupportedOperationException.