@Override public boolean hasNext() { checkRead(); return baseIter.hasNext(); }
@Override public void remove() { checkWrite(); baseIter.remove(); } };
@Override public Iterator<Triple> iterator() { return filter(null, null, null); }
/** * Returns the wrapped Graph if the caller has all access rights. * If the caller has only the read access right, then a write-blocked * Graph is returned. If the caller has neither the read nor the write * access right then an AccessControlException is thrown. * * @return the wrapped Graph or a write-block Graph depending * on the access rights of the caller. */ public Graph getUnsecuredGraph() { try { checkWrite(); return wrapped; } catch (AccessControlException ex) { checkRead(); return new WriteBlockedGraph(wrapped); } } }
@Override public Object getService(Bundle arg0, ServiceRegistration arg1) { return new SecuredGraph(tcManager.getMGraph(name), name, tcAccessController); }
private Graph getSystemGraph() { return ((SecuredGraph) securedSystemGraph).getUnsecuredGraph(); }
/** * Returns the wrapped Graph if the caller has all access rights. * If the caller has only the read access right, then a write-blocked * Graph is returned. If the caller has neither the read nor the write * access right then an AccessControlException is thrown. * * @return the wrapped Graph or a write-block Graph depending * on the access rights of the caller. */ public Graph getUnsecuredGraph() { try { checkWrite(); return wrapped; } catch (AccessControlException ex) { checkRead(); return new WriteBlockedGraph(wrapped); } } }
@Override public Object getService(Bundle arg0, ServiceRegistration arg1) { return new SecuredGraph(tcManager.getMGraph(name), name, tcAccessController); }
@Override public Triple next() { checkRead(); return baseIter.next(); }
@Override public void remove() { checkWrite(); baseIter.remove(); } };
@Override public Object getService(Bundle arg0, ServiceRegistration arg1) { Graph tc = new SecuredGraph(tcManager.getImmutableGraph(name), name, tcAccessController); return tc.getImmutableGraph(); }
@Override public Iterator<Triple> iterator() { return filter(null, null, null); }
@Override public boolean hasNext() { checkRead(); return baseIter.hasNext(); }
@Override public boolean add(Triple e) { checkWrite(); return wrapped.add(e); }
@Override public Object getService(Bundle arg0, ServiceRegistration arg1) { Graph tc = new SecuredGraph(tcManager.getImmutableGraph(name), name, tcAccessController); return tc.getImmutableGraph(); }
@Override public Triple next() { checkRead(); return baseIter.next(); }
@Override public void clear() { checkWrite(); wrapped.clear(); }
@Override public boolean contains(Object o) { checkRead(); return wrapped.contains((Triple) o); }
@Override public boolean remove(Object o) { checkWrite(); return wrapped.remove(o); }
@Override public int size() { checkRead(); return wrapped.size(); }