org.apache.clerezza.rdf.core.access
Class SecuredMGraph
java.lang.Object
org.apache.clerezza.rdf.core.access.SecuredTripleCollection
org.apache.clerezza.rdf.core.access.SecuredMGraph
- All Implemented Interfaces:
- Iterable<Triple>, Collection<Triple>, LockableMGraph, MGraph, TripleCollection
public class SecuredMGraph
- extends SecuredTripleCollection
- implements LockableMGraph
A SecuredMGraph is a LockableMGraph that wraps a LockableMGraph checking each
access for the rights on a the graph for which the uri is passed to the
constructor.
- Author:
- mir
| Methods inherited from class org.apache.clerezza.rdf.core.access.SecuredTripleCollection |
add, addAll, addGraphListener, addGraphListener, clear, contains, containsAll, filter, isEmpty, iterator, remove, removeAll, removeGraphListener, retainAll, size, toArray, toArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.clerezza.rdf.core.MGraph |
equals |
| Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
SecuredMGraph
public SecuredMGraph(LockableMGraph wrapped,
UriRef name,
TcAccessController tcAccessController)
getGraph
public Graph getGraph()
- Description copied from interface:
MGraph
- Returns the graph
- Specified by:
getGraph in interface MGraph
- Returns:
- graph
getLock
public ReadWriteLock getLock()
- Description copied from interface:
LockableMGraph
- The lock provided by this methods allows to create read- and write-locks
that span individual method calls. Having a read locks prevents other
threads from writing to this MGraph, having a write-lock prevents other
threads from reading and writing.
- Specified by:
getLock in interface LockableMGraph
- Returns:
- the lock of this MGraph
getUnsecuredMGraph
public LockableMGraph getUnsecuredMGraph()
- Returns the wrapped LockableMGraph if the caller has all access rights.
If the caller has only the read access right, then a write-blocked
LockableMGraph is returned. If the caller has neither the read nor the write
access right then an AccessControlException is thrown.
- Returns:
- the wrapped LockableMGraph or a write-block LockableMGraph depending
on the access rights of the caller.
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.