jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cla...@apache.org
Subject [06/10] jena git commit: Updates for JENA-990 Modified permissions to use new Exceptions. Added ReadDeniedException Added UpdateDeniedException
Date Fri, 17 Jul 2015 18:06:13 GMT
http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredSeq.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredSeq.java b/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredSeq.java
index 7ce88b4..329e511 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredSeq.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredSeq.java
@@ -17,10 +17,13 @@
  */
 package org.apache.jena.permissions.model;
 
-import org.apache.jena.permissions.AccessDeniedException;
+
+import org.apache.jena.permissions.ReadDeniedException;
+import org.apache.jena.permissions.UpdateDeniedException;
 import org.apache.jena.rdf.model.RDFNode ;
 import org.apache.jena.rdf.model.ResourceF ;
 import org.apache.jena.rdf.model.Seq ;
+import org.apache.jena.shared.DeleteDeniedException;
 
 /**
  * The interface for secured Seq instances.
@@ -33,353 +36,408 @@ import org.apache.jena.rdf.model.Seq ;
  */
 public interface SecuredSeq extends Seq, SecuredContainer
 {
-	/**
+	/**	 * 
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final boolean o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final char o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final double o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final float o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final long o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final Object o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final RDFNode o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final String o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Create SecTriple( this, RDF.li(1), o )
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
 	public SecuredSeq add( final int index, final String o, final String l )
-			throws AccessDeniedException;
+			throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public SecuredAlt getAlt( final int index ) throws AccessDeniedException;
+	public SecuredAlt getAlt( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public SecuredBag getBag( final int index ) throws AccessDeniedException;
+	public SecuredBag getBag( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public boolean getBoolean( final int index ) throws AccessDeniedException;
+	public boolean getBoolean( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public byte getByte( final int index ) throws AccessDeniedException;
+	public byte getByte( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public char getChar( final int index ) throws AccessDeniedException;
+	public char getChar( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public double getDouble( final int index ) throws AccessDeniedException;
+	public double getDouble( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public float getFloat( final int index ) throws AccessDeniedException;
+	public float getFloat( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int getInt( final int index ) throws AccessDeniedException;
+	public int getInt( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public String getLanguage( final int index ) throws AccessDeniedException;
+	public String getLanguage( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
 	public SecuredLiteral getLiteral( final int index )
-			throws AccessDeniedException;
+			throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public long getLong( final int index ) throws AccessDeniedException;
+	public long getLong( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
 	public SecuredRDFNode getObject( final int index )
-			throws AccessDeniedException;
+			throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
 	public SecuredResource getResource( final int index )
-			throws AccessDeniedException;
+			throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
 	@Deprecated
 	public SecuredResource getResource( final int index, final ResourceF f )
-			throws AccessDeniedException;
+			throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public SecuredSeq getSeq( final int index ) throws AccessDeniedException;
+	public SecuredSeq getSeq( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public short getShort( final int index ) throws AccessDeniedException;
+	public short getShort( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public String getString( final int index ) throws AccessDeniedException;
+	public String getString( final int index ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final boolean o ) throws AccessDeniedException;
+	public int indexOf( final boolean o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final char o ) throws AccessDeniedException;
+	public int indexOf( final char o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final double o ) throws AccessDeniedException;
+	public int indexOf( final double o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final float o ) throws AccessDeniedException;
+	public int indexOf( final float o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final long o ) throws AccessDeniedException;
+	public int indexOf( final long o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final Object o ) throws AccessDeniedException;
+	public int indexOf( final Object o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final RDFNode o ) throws AccessDeniedException;
+	public int indexOf( final RDFNode o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int indexOf( final String o ) throws AccessDeniedException;
+	public int indexOf( final String o ) throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read SecTriple( this, RDF.li(1), o )
+	 * @throws ReadDeniedException
 	 */
 	@Override
 	public int indexOf( final String o, final String l )
-			throws AccessDeniedException;
+			throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Delete SecTriple( this, RDF.li(1), o )
 	 * @sec.triple Update Triples after index
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
-	public SecuredSeq remove( final int index ) throws AccessDeniedException;
+	public SecuredSeq remove( final int index ) throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final boolean o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final char o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final double o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final float o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final long o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final Object o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final RDFNode o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final String o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update SecTriple( this, RDF.li(index), old ) SecTriple( this,
 	 *            RDF.li(index), o )
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredSeq set( final int index, final String o, final String l )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredStatement.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredStatement.java b/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredStatement.java
index c10a9a2..ba610be 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredStatement.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredStatement.java
@@ -17,9 +17,13 @@
  */
 package org.apache.jena.permissions.model;
 
-import org.apache.jena.permissions.AccessDeniedException;
+
+import org.apache.jena.permissions.ReadDeniedException;
+import org.apache.jena.permissions.UpdateDeniedException;
 import org.apache.jena.permissions.impl.SecuredItem;
 import org.apache.jena.rdf.model.* ;
+import org.apache.jena.shared.AddDeniedException;
+import org.apache.jena.shared.DeleteDeniedException;
 
 /**
  * The interface for secured Statement instances.
@@ -31,119 +35,123 @@ public interface SecuredStatement extends Statement, SecuredItem
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeLiteralObject( boolean o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeLiteralObject( char o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeLiteralObject( double o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeLiteralObject( float o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeLiteralObject( int o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeLiteralObject( long o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
-	 * @sec.triple update
-	 * @throws AccessDeniedException
+	 * @sec.triple Update
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeObject( RDFNode o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeObject( String o )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeObject( String o, boolean wellFormed )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeObject( String o, String l )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Update
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
 	 */
 	@Override
 	public SecuredStatement changeObject( String o, String l, boolean wellFormed )
-			throws AccessDeniedException;
+			throws UpdateDeniedException;
 
 	/**
 	 * @sec.graph Read, Update
 	 * @sec.triple Create
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
+	 * @throws UpdateDeniedException
+	 * @throws AddDeniedException
 	 */
 	@Override
 	public SecuredReifiedStatement createReifiedStatement()
-			throws AccessDeniedException;
+			throws ReadDeniedException, UpdateDeniedException, AddDeniedException;
 
 	/**
 	 * @sec.graph Read, Update
 	 * @sec.triple Create
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
+	 * @throws UpdateDeniedException
+	 * @throws AddDeniedException
 	 */
 	@Override
 	public SecuredReifiedStatement createReifiedStatement( String uri )
-			throws AccessDeniedException;
+			throws ReadDeniedException, UpdateDeniedException, AddDeniedException;
 
 	@Override
 	public SecuredAlt getAlt();
@@ -153,62 +161,62 @@ public interface SecuredStatement extends Statement, SecuredItem
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public boolean getBoolean() throws AccessDeniedException;
+	public boolean getBoolean() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public byte getByte() throws AccessDeniedException;
+	public byte getByte() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public char getChar() throws AccessDeniedException;
+	public char getChar() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public double getDouble() throws AccessDeniedException;
+	public double getDouble() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public float getFloat() throws AccessDeniedException;
+	public float getFloat() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public int getInt() throws AccessDeniedException;
+	public int getInt() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public String getLanguage() throws AccessDeniedException;
+	public String getLanguage() throws ReadDeniedException;
 
 	@Override
 	public SecuredLiteral getLiteral();
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public long getLong() throws AccessDeniedException;
+	public long getLong() throws ReadDeniedException;
 
 	@Override
 	public SecuredModel getModel();
@@ -234,20 +242,20 @@ public interface SecuredStatement extends Statement, SecuredItem
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public short getShort() throws AccessDeniedException;
+	public short getShort() throws ReadDeniedException;
 
 	@Override
 	public SecuredStatement getStatementProperty( Property p );
 
 	/**
 	 * @sec.graph Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public String getString() throws AccessDeniedException;
+	public String getString() throws ReadDeniedException;
 
 	@Override
 	public SecuredResource getSubject();
@@ -255,41 +263,43 @@ public interface SecuredStatement extends Statement, SecuredItem
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public boolean hasWellFormedXML() throws AccessDeniedException;
+	public boolean hasWellFormedXML() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public boolean isReified() throws AccessDeniedException;
+	public boolean isReified() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Read
 	 * @sec.triple Read
-	 * @throws AccessDeniedException
+	 * @throws ReadDeniedException
 	 */
 	@Override
-	public RSIterator listReifiedStatements() throws AccessDeniedException;
+	public RSIterator listReifiedStatements() throws ReadDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Delete
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
-	public SecuredStatement remove() throws AccessDeniedException;
+	public SecuredStatement remove() throws UpdateDeniedException, DeleteDeniedException;
 
 	/**
 	 * @sec.graph Update
 	 * @sec.triple Delete
-	 * @throws AccessDeniedException
+	 * @throws UpdateDeniedException
+	 * @throws DeleteDeniedException
 	 */
 	@Override
-	public void removeReification() throws AccessDeniedException;
+	public void removeReification() throws UpdateDeniedException, DeleteDeniedException;
 
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredModelImpl.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredModelImpl.java b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredModelImpl.java
index 37d856b..8810487 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredModelImpl.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredModelImpl.java
@@ -27,7 +27,6 @@ import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.NodeFactory ;
 import org.apache.jena.graph.Triple ;
 import org.apache.jena.graph.impl.CollectionGraph ;
-import org.apache.jena.permissions.AccessDeniedException;
 import org.apache.jena.permissions.SecurityEvaluator;
 import org.apache.jena.permissions.SecurityEvaluator.SecTriple;
 import org.apache.jena.permissions.graph.SecuredGraph;
@@ -2073,20 +2072,20 @@ public class SecuredModelImpl extends SecuredItemImpl implements SecuredModel
 	public SecuredModel read( final InputStream in, final String base )
 	{
 		checkUpdate();
-		try
-		{
+//		try
+//		{
 			SecuredModelImpl.readerFactory.getReader().read(holder.getSecuredItem(), in, base);
 			return holder.getSecuredItem();
-		}
-		catch (final JenaException e)
-		{
-			if ((e.getCause() != null)
-					&& (e.getCause() instanceof AccessDeniedException))
-			{
-				throw (AccessDeniedException) e.getCause();
-			}
-			throw e;
-		}
+//		}
+//		catch (final JenaException e)
+//		{
+//			if ((e.getCause() != null)
+//					&& (e.getCause() instanceof AccessDeniedRuntimeException))
+//			{
+//				throw (AccessDeniedRuntimeException) e.getCause();
+//			}
+//			throw e;
+//		}
 	}
 
 	@Override
@@ -2094,40 +2093,40 @@ public class SecuredModelImpl extends SecuredItemImpl implements SecuredModel
 			final String lang )
 	{
 		checkUpdate();
-		try
-		{
+//		try
+//		{
 			SecuredModelImpl.readerFactory.getReader(lang).read(holder.getSecuredItem(), in, base);
 			return holder.getSecuredItem();
-		}
-		catch (final JenaException e)
-		{
-			if ((e.getCause() != null)
-					&& (e.getCause() instanceof AccessDeniedException))
-			{
-				throw (AccessDeniedException) e.getCause();
-			}
-			throw e;
-		}
+//		}
+//		catch (final JenaException e)
+//		{
+//			if ((e.getCause() != null)
+//					&& (e.getCause() instanceof AccessDeniedRuntimeException))
+//			{
+//				throw (AccessDeniedRuntimeException) e.getCause();
+//			}
+//			throw e;
+//		}
 	}
 
 	@Override
 	public SecuredModel read( final Reader reader, final String base )
 	{
 		checkUpdate();
-		try
-		{
+//		try
+//		{
 			SecuredModelImpl.readerFactory.getReader().read(holder.getSecuredItem(), reader, base);
 			return holder.getSecuredItem();
-		}
-		catch (final JenaException e)
-		{
-			if ((e.getCause() != null)
-					&& (e.getCause() instanceof AccessDeniedException))
-			{
-				throw (AccessDeniedException) e.getCause();
-			}
-			throw e;
-		}
+//		}
+//		catch (final JenaException e)
+//		{
+//			if ((e.getCause() != null)
+//					&& (e.getCause() instanceof AccessDeniedRuntimeException))
+//			{
+//				throw (AccessDeniedRuntimeException) e.getCause();
+//			}
+//			throw e;
+//		}
 	}
 
 	@Override
@@ -2135,61 +2134,61 @@ public class SecuredModelImpl extends SecuredItemImpl implements SecuredModel
 			final String lang )
 	{
 		checkUpdate();
-		try
-		{
+//		try
+//		{
 			SecuredModelImpl.readerFactory.getReader(lang).read(holder.getSecuredItem(), reader,
 					base);
 			return holder.getSecuredItem();
-		}
-		catch (final JenaException e)
-		{
-			if ((e.getCause() != null)
-					&& (e.getCause() instanceof AccessDeniedException))
-			{
-				throw (AccessDeniedException) e.getCause();
-			}
-			throw e;
-		}
+//		}
+//		catch (final JenaException e)
+//		{
+//			if ((e.getCause() != null)
+//					&& (e.getCause() instanceof AccessDeniedRuntimeException))
+//			{
+//				throw (AccessDeniedRuntimeException) e.getCause();
+//			}
+//			throw e;
+//		}
 	}
 
 	@Override
 	public SecuredModel read( final String url )
 	{
 		checkUpdate();
-		try
-		{
+//		try
+//		{
 			SecuredModelImpl.readerFactory.getReader().read(holder.getSecuredItem(), url);
 			return holder.getSecuredItem();
-		}
-		catch (final JenaException e)
-		{
-			if ((e.getCause() != null)
-					&& (e.getCause() instanceof AccessDeniedException))
-			{
-				throw (AccessDeniedException) e.getCause();
-			}
-			throw e;
-		}
+//		}
+//		catch (final JenaException e)
+//		{
+//			if ((e.getCause() != null)
+//					&& (e.getCause() instanceof AccessDeniedRuntimeException))
+//			{
+//				throw (AccessDeniedRuntimeException) e.getCause();
+//			}
+//			throw e;
+//		}
 	}
 
 	@Override
 	public SecuredModel read( final String url, final String lang )
 	{
 		checkUpdate();
-		try
-		{
+//		try
+//		{
 			SecuredModelImpl.readerFactory.getReader(lang).read(holder.getSecuredItem(), url);
 			return holder.getSecuredItem();
-		}
-		catch (final JenaException e)
-		{
-			if ((e.getCause() != null)
-					&& (e.getCause() instanceof AccessDeniedException))
-			{
-				throw (AccessDeniedException) e.getCause();
-			}
-			throw e;
-		}
+//		}
+//		catch (final JenaException e)
+//		{
+//			if ((e.getCause() != null)
+//					&& (e.getCause() instanceof AccessDeniedRuntimeException))
+//			{
+//				throw (AccessDeniedRuntimeException) e.getCause();
+//			}
+//			throw e;
+//		}
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredRDFListImpl.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredRDFListImpl.java b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredRDFListImpl.java
index 8056c1e..7db89b5 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredRDFListImpl.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredRDFListImpl.java
@@ -26,10 +26,10 @@ import java.util.function.Function;
 
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
-import org.apache.jena.permissions.AccessDeniedException;
 import org.apache.jena.permissions.SecurityEvaluator;
 import org.apache.jena.permissions.SecurityEvaluator.Action;
 import org.apache.jena.permissions.impl.ItemHolder;
+import org.apache.jena.permissions.impl.SecuredItem;
 import org.apache.jena.permissions.impl.SecuredItemImpl;
 import org.apache.jena.permissions.impl.SecuredItemInvoker;
 import org.apache.jena.permissions.model.SecuredModel;
@@ -38,6 +38,7 @@ import org.apache.jena.permissions.model.SecuredRDFNode;
 import org.apache.jena.permissions.utils.RDFListIterator;
 import org.apache.jena.permissions.utils.RDFListSecFilter;
 import org.apache.jena.rdf.model.* ;
+import org.apache.jena.shared.DeleteDeniedException;
 import org.apache.jena.util.iterator.ExtendedIterator ;
 import org.apache.jena.util.iterator.WrappedIterator ;
 import org.apache.jena.vocabulary.RDF ;
@@ -767,7 +768,7 @@ public class SecuredRDFListImpl extends SecuredResourceImpl implements
 
 	@Override
 	public Object reduce( final Set<Action> requiredActions, final ReduceFn fn,
-			final Object initial ) throws AccessDeniedException,
+			final Object initial ) throws 
 			EmptyListException, ListIndexException, InvalidListException
 	{
 		Object acc = initial;
@@ -815,7 +816,7 @@ public class SecuredRDFListImpl extends SecuredResourceImpl implements
 			}
 			if (denied)
 			{
-				throw new AccessDeniedException(getModelNode(), Action.Delete);
+				throw new DeleteDeniedException(SecuredItem.Util.triplePermissionMsg(getModelNode()));
 			}
 			else
 			{

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredResourceImpl.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredResourceImpl.java b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredResourceImpl.java
index 3a19867..7f6c511 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredResourceImpl.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredResourceImpl.java
@@ -21,9 +21,10 @@ import org.apache.jena.datatypes.RDFDatatype ;
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.NodeFactory ;
 import org.apache.jena.graph.Triple ;
-import org.apache.jena.permissions.AccessDeniedException;
+import org.apache.jena.permissions.ReadDeniedException;
 import org.apache.jena.permissions.SecurityEvaluator.Action;
 import org.apache.jena.permissions.impl.ItemHolder;
+import org.apache.jena.permissions.impl.SecuredItem;
 import org.apache.jena.permissions.impl.SecuredItemImpl;
 import org.apache.jena.permissions.impl.SecuredItemInvoker;
 import org.apache.jena.permissions.model.SecuredModel;
@@ -356,10 +357,9 @@ public class SecuredResourceImpl extends SecuredRDFNodeImpl implements
 	{
 		if (!canReadProperty(p))
 		{
-			throw new AccessDeniedException(getModelNode(), SecuredItemImpl
-					.convert(
-							new Triple(holder.getBaseItem().asNode(), p,
-									Node.ANY)).toString(), Action.Read);
+			throw new ReadDeniedException(SecuredItem.Util.triplePermissionMsg(getModelNode()), 
+					new Triple(holder.getBaseItem().asNode(), p,
+									Node.ANY));
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java b/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java
index 925bc5b..2fea0ad 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java
@@ -22,11 +22,12 @@ import java.util.List;
 
 import org.apache.jena.graph.Node ;
 import org.apache.jena.graph.Triple ;
-import org.apache.jena.permissions.AccessDeniedException;
+import org.apache.jena.permissions.ReadDeniedException;
 import org.apache.jena.permissions.SecurityEvaluator;
 import org.apache.jena.permissions.SecurityEvaluator.Action;
 import org.apache.jena.permissions.SecurityEvaluator.SecNode;
 import org.apache.jena.permissions.SecurityEvaluator.SecTriple;
+import org.apache.jena.permissions.impl.SecuredItem;
 import org.apache.jena.permissions.impl.SecuredItemImpl;
 import org.apache.jena.sparql.algebra.Op ;
 import org.apache.jena.sparql.algebra.OpVisitor ;
@@ -217,7 +218,7 @@ public class OpRewriter implements OpVisitor
 			}
 			else
 			{
-				throw new AccessDeniedException(graphIRI, Action.Read);
+				throw new ReadDeniedException(SecuredItem.Util.modelPermissionMsg(graphIRI));
 			}
 		}
 

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/test/java/org/apache/jena/permissions/graph/CrossIDGraphEventManagerTest.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/CrossIDGraphEventManagerTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/CrossIDGraphEventManagerTest.java
index e3544e0..e9af258 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/CrossIDGraphEventManagerTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/CrossIDGraphEventManagerTest.java
@@ -17,14 +17,14 @@
  */
 package org.apache.jena.permissions.graph;
 
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.GraphEventManager ;
-import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.graph.Triple ;
+import org.apache.jena.graph.Graph;
+import org.apache.jena.graph.GraphEventManager;
+import org.apache.jena.graph.NodeFactory;
+import org.apache.jena.graph.Triple;
 import org.apache.jena.permissions.Factory;
 import org.apache.jena.permissions.StaticSecurityEvaluator;
 import org.apache.jena.permissions.graph.SecuredGraph;
-import org.apache.jena.sparql.graph.GraphFactory ;
+import org.apache.jena.sparql.graph.GraphFactory;
 import org.junit.Assert;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
index 4a99c5c..8e01cf9 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
@@ -17,21 +17,19 @@
  */
 package org.apache.jena.permissions.graph;
 
-import java.util.Arrays;
 import java.util.Set;
 
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.GraphEventManager ;
-import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.graph.impl.CollectionGraph ;
+import org.apache.jena.graph.Graph;
+import org.apache.jena.graph.GraphEventManager;
+import org.apache.jena.graph.NodeFactory;
+import org.apache.jena.graph.Triple;
 import org.apache.jena.permissions.Factory;
 import org.apache.jena.permissions.MockSecurityEvaluator;
 import org.apache.jena.permissions.SecurityEvaluator;
 import org.apache.jena.permissions.SecurityEvaluatorParameters;
 import org.apache.jena.permissions.SecurityEvaluator.Action;
 import org.apache.jena.permissions.graph.SecuredGraph;
-import org.apache.jena.sparql.graph.GraphFactory ;
+import org.apache.jena.sparql.graph.GraphFactory;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -41,9 +39,8 @@ import org.junit.runner.RunWith;
  * Verifies that messages are properly filtered when sent to listeners.
  *
  */
-@RunWith( value = SecurityEvaluatorParameters.class )
-public class GraphEventManagerTest
-{
+@RunWith(value = SecurityEvaluatorParameters.class)
+public class GraphEventManagerTest {
 	private final GraphEventManager manager;
 	private final Graph g;
 	private final SecuredGraph sg;
@@ -52,8 +49,7 @@ public class GraphEventManagerTest
 
 	private final RecordingGraphListener listener;
 
-	public GraphEventManagerTest( final MockSecurityEvaluator securityEvaluator )
-	{
+	public GraphEventManagerTest(final MockSecurityEvaluator securityEvaluator) {
 		this.securityEvaluator = securityEvaluator;
 		g = GraphFactory.createDefaultGraph();
 
@@ -67,18 +63,14 @@ public class GraphEventManagerTest
 
 	@Test
 	@SuppressWarnings("deprecation")
-	public void notifyAddTest()
-	{
+	public void notifyAddTest() {
 		Object principal = securityEvaluator.getPrincipal();
 		final Set<Action> ADD = SecurityEvaluator.Util.asSet(new Action[] {
 				Action.Create, Action.Read });
 		g.add(tripleArray[0]);
-		if (securityEvaluator.evaluateAny(principal, ADD, sg.getModelNode()))
-		{
+		if (securityEvaluator.evaluateAny(principal, ADD, sg.getModelNode())) {
 			Assert.assertTrue("Should recorded add", listener.isAdd());
-		}
-		else
-		{
+		} else {
 			Assert.assertFalse("Should not have recorded add", listener.isAdd());
 		}
 		g.delete(Triple.ANY);
@@ -87,32 +79,26 @@ public class GraphEventManagerTest
 	}
 
 	@SuppressWarnings("deprecation")
-    @Test
-	public void notifyDeleteTest()
-	{
+	@Test
+	public void notifyDeleteTest() {
 		Object principal = securityEvaluator.getPrincipal();
 		final Set<Action> DELETE = SecurityEvaluator.Util.asSet(new Action[] {
 				Action.Delete, Action.Read });
 		g.delete(tripleArray[0]);
-		if (securityEvaluator.evaluateAny(principal, DELETE, sg.getModelNode()))
-		{
+		if (securityEvaluator.evaluateAny(principal, DELETE, sg.getModelNode())) {
 			Assert.assertTrue("Should have recorded delete",
 					listener.isDelete());
-		}
-		else
-		{
+		} else {
 			Assert.assertFalse("Should not have recorded delete",
 					listener.isDelete());
 		}
 
 		listener.reset();
 
-		
 	}
 
 	@Test
-	public void notifyEventTest()
-	{
+	public void notifyEventTest() {
 		g.getEventManager().notifyEvent(g, "Foo");
 		Assert.assertTrue("Should recorded delete", listener.isEvent());
 		listener.reset();
@@ -127,8 +113,7 @@ public class GraphEventManagerTest
 	}
 
 	@Before
-	public void setup()
-	{
+	public void setup() {
 		tripleArray = new Triple[] {
 				new Triple(NodeFactory.createURI("http://example.com/1"),
 						NodeFactory.createURI("http://example.com/v"),

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
index bc086b4..fb1d862 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
@@ -17,26 +17,25 @@
  */
 package org.apache.jena.permissions.graph;
 
-import java.lang.reflect.Method;
 import java.util.Set;
 
-import org.apache.jena.graph.* ;
-import org.apache.jena.permissions.AccessDeniedException;
+import org.apache.jena.graph.*;
 import org.apache.jena.permissions.EqualityTester;
 import org.apache.jena.permissions.MockSecurityEvaluator;
+import org.apache.jena.permissions.ReadDeniedException;
 import org.apache.jena.permissions.SecurityEvaluator;
 import org.apache.jena.permissions.SecurityEvaluatorParameters;
 import org.apache.jena.permissions.SecurityEvaluator.Action;
 import org.apache.jena.permissions.graph.SecuredGraph;
-import org.apache.jena.sparql.graph.GraphFactory ;
+import org.apache.jena.shared.AccessDeniedException;
+import org.apache.jena.sparql.graph.GraphFactory;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-@RunWith( value = SecurityEvaluatorParameters.class )
-public class MemGraphTest
-{
+@RunWith(value = SecurityEvaluatorParameters.class)
+public class MemGraphTest {
 	private SecuredGraph securedGraph;
 	private final MockSecurityEvaluator securityEvaluator;
 	private Node s;
@@ -46,20 +45,17 @@ public class MemGraphTest
 
 	private Graph baseGraph;
 
-	public MemGraphTest( final MockSecurityEvaluator securityEvaluator )
-	{
+	public MemGraphTest(final MockSecurityEvaluator securityEvaluator) {
 		this.securityEvaluator = securityEvaluator;
 	}
 
-	protected Graph createGraph() throws Exception
-	{
+	protected Graph createGraph() throws Exception {
 		return GraphFactory.createDefaultGraph();
 	}
 
 	@SuppressWarnings("deprecation")
-    @Before
-	public void setUp() throws Exception
-	{
+	@Before
+	public void setUp() throws Exception {
 		baseGraph = createGraph();
 		baseGraph.remove(Node.ANY, Node.ANY, Node.ANY);
 		securedGraph = org.apache.jena.permissions.Factory
@@ -73,44 +69,32 @@ public class MemGraphTest
 	}
 
 	@Test
-	public void testContainsNodes() throws Exception
-	{
-		try
-		{
+	public void testContainsNodes() throws Exception {
+		try {
 			Assert.assertTrue(securedGraph.contains(s, p, o));
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testContainsTriple() throws Exception
-	{
-		try
-		{
+	public void testContainsTriple() throws Exception {
+		try {
 			Assert.assertTrue(securedGraph.contains(t));
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
@@ -118,25 +102,19 @@ public class MemGraphTest
 	}
 
 	@Test
-	public void testDelete() throws Exception
-	{
+	public void testDelete() throws Exception {
 		final Set<Action> UD = SecurityEvaluator.Util.asSet(new Action[] {
 				Action.Update, Action.Delete });
-		try
-		{
+		try {
 			securedGraph.delete(t);
 
-			if (!securityEvaluator.evaluate(UD))
-			{
+			if (!securityEvaluator.evaluate(UD)) {
 				Assert.fail("Should have thrown AccessDenied Exception");
 			}
 			Assert.assertEquals(0, baseGraph.size());
 
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(UD))
-			{
+		} catch (final AccessDeniedException e) {
+			if (securityEvaluator.evaluate(UD)) {
 				Assert.fail(String
 						.format("Should not have thrown AccessDenied Exception: %s - %s",
 								e, e.getTriple()));
@@ -145,101 +123,76 @@ public class MemGraphTest
 	}
 
 	@Test
-	public void testDependsOn() throws Exception
-	{
-		try
-		{
+	public void testDependsOn() throws Exception {
+		try {
 			Assert.assertFalse(securedGraph.dependsOn(GraphFactory
 					.createDefaultGraph()));
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
-		try
-		{
+		try {
 			Assert.assertTrue(securedGraph.dependsOn(baseGraph));
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testFindNodes() throws Exception
-	{
-		try
-		{
+	public void testFindNodes() throws Exception {
+		try {
 
 			Assert.assertFalse(securedGraph.find(Node.ANY, Node.ANY, Node.ANY)
 					.toList().isEmpty());
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testFindTriple() throws Exception
-	{
-		try
-		{
+	public void testFindTriple() throws Exception {
+		try {
 			Assert.assertFalse(securedGraph.find(t).toList().isEmpty());
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testGetPrefixMapping() throws Exception
-	{
+	public void testGetPrefixMapping() throws Exception {
 		SecuredPrefixMappingTest.runTests(securityEvaluator,
 				securedGraph.getPrefixMapping());
 	}
 
 	@Test
-	public void testInequality()
-	{
+	public void testInequality() {
 		EqualityTester
 				.testInequality("proxy and base", securedGraph, baseGraph);
 		final Graph g2 = org.apache.jena.permissions.graph.impl.Factory
@@ -250,62 +203,45 @@ public class MemGraphTest
 	}
 
 	@Test
-	public void testIsIsomorphicWith() throws Exception
-	{
-		try
-		{
+	public void testIsIsomorphicWith() throws Exception {
+		try {
 			Assert.assertFalse(securedGraph.isIsomorphicWith(GraphFactory
 					.createDefaultGraph()));
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
-		try
-		{
+		try {
 			Assert.assertTrue(securedGraph.isIsomorphicWith(baseGraph));
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testSize() throws Exception
-	{
-		try
-		{
+	public void testSize() throws Exception {
+		try {
 			Assert.assertEquals(1, securedGraph.size());
-			if (!securityEvaluator.evaluate(Action.Read))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+			if (!securityEvaluator.evaluate(Action.Read)) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
-			if (securityEvaluator.evaluate(Action.Read))
-			{
+		} catch (final ReadDeniedException e) {
+			if (securityEvaluator.evaluate(Action.Read)) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/test/java/org/apache/jena/permissions/graph/RecordingGraphListener.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/RecordingGraphListener.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/RecordingGraphListener.java
index 5a75461..0346aff 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/RecordingGraphListener.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/RecordingGraphListener.java
@@ -3,9 +3,9 @@ package org.apache.jena.permissions.graph;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.GraphListener ;
-import org.apache.jena.graph.Triple ;
+import org.apache.jena.graph.Graph;
+import org.apache.jena.graph.GraphListener;
+import org.apache.jena.graph.Triple;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -25,97 +25,80 @@ import org.apache.jena.graph.Triple ;
  * limitations under the License.
  */
 
-public class RecordingGraphListener implements GraphListener
-{
+public class RecordingGraphListener implements GraphListener {
 
 	private boolean add;
 	private boolean delete;
 	private boolean event;
 
-	public boolean isAdd()
-	{
+	public boolean isAdd() {
 		return add;
 	}
 
-	public boolean isDelete()
-	{
+	public boolean isDelete() {
 		return delete;
 	}
 
-	public boolean isEvent()
-	{
+	public boolean isEvent() {
 		return event;
 	}
 
 	@Override
-	public void notifyAddArray( final Graph g, final Triple[] triples )
-	{
+	public void notifyAddArray(final Graph g, final Triple[] triples) {
 		add = true;
 	}
 
 	@Override
-	public void notifyAddGraph( final Graph g, final Graph added )
-	{
+	public void notifyAddGraph(final Graph g, final Graph added) {
 		add = true;
 	}
 
 	@Override
-	public void notifyAddIterator( final Graph g, final Iterator<Triple> it )
-	{
+	public void notifyAddIterator(final Graph g, final Iterator<Triple> it) {
 		add = true;
 	}
 
 	@Override
-	public void notifyAddList( final Graph g, final List<Triple> triples )
-	{
+	public void notifyAddList(final Graph g, final List<Triple> triples) {
 		add = true;
 	}
 
 	@Override
-	public void notifyAddTriple( final Graph g, final Triple t )
-	{
+	public void notifyAddTriple(final Graph g, final Triple t) {
 		add = true;
 	}
 
 	@Override
-	public void notifyDeleteArray( final Graph g, final Triple[] triples )
-	{
+	public void notifyDeleteArray(final Graph g, final Triple[] triples) {
 		delete = true;
 	}
 
 	@Override
-	public void notifyDeleteGraph( final Graph g, final Graph removed )
-	{
+	public void notifyDeleteGraph(final Graph g, final Graph removed) {
 		delete = true;
 	}
 
 	@Override
-	public void notifyDeleteIterator( final Graph g,
-			final Iterator<Triple> it )
-	{
+	public void notifyDeleteIterator(final Graph g, final Iterator<Triple> it) {
 		delete = true;
 	}
 
 	@Override
-	public void notifyDeleteList( final Graph g, final List<Triple> L )
-	{
+	public void notifyDeleteList(final Graph g, final List<Triple> L) {
 		delete = true;
 	}
 
 	@Override
-	public void notifyDeleteTriple( final Graph g, final Triple t )
-	{
+	public void notifyDeleteTriple(final Graph g, final Triple t) {
 		delete = true;
 	}
 
 	@Override
-	public void notifyEvent( final Graph source, final Object value )
-	{
+	public void notifyEvent(final Graph source, final Object value) {
 		event = true;
 	}
 
-	public void reset()
-	{
+	public void reset() {
 		add = false;
 		delete = false;
 		event = false;

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/test/java/org/apache/jena/permissions/graph/SecuredPrefixMappingTest.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/SecuredPrefixMappingTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/SecuredPrefixMappingTest.java
index e4d55ba..52c1674 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/SecuredPrefixMappingTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/SecuredPrefixMappingTest.java
@@ -21,27 +21,26 @@ import java.lang.reflect.Method;
 import java.util.HashMap;
 
 import org.junit.Assert;
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.permissions.AccessDeniedException;
+import org.apache.jena.graph.Graph;
 import org.apache.jena.permissions.Factory;
+import org.apache.jena.permissions.ReadDeniedException;
 import org.apache.jena.permissions.SecurityEvaluator;
 import org.apache.jena.permissions.SecurityEvaluatorParameters;
 import org.apache.jena.permissions.SecurityEvaluator.Action;
+import org.apache.jena.permissions.UpdateDeniedException;
 import org.apache.jena.permissions.graph.SecuredGraph;
 import org.apache.jena.permissions.graph.SecuredPrefixMapping;
-import org.apache.jena.shared.PrefixMapping ;
-import org.apache.jena.shared.impl.PrefixMappingImpl ;
-import org.apache.jena.sparql.graph.GraphFactory ;
+import org.apache.jena.shared.PrefixMapping;
+import org.apache.jena.shared.impl.PrefixMappingImpl;
+import org.apache.jena.sparql.graph.GraphFactory;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-@RunWith( value = SecurityEvaluatorParameters.class )
-public class SecuredPrefixMappingTest
-{
-	public static void runTests( final SecurityEvaluator securityEvaluator,
-			final PrefixMapping prefixMapping ) throws Exception
-	{
+@RunWith(value = SecurityEvaluatorParameters.class)
+public class SecuredPrefixMappingTest {
+	public static void runTests(final SecurityEvaluator securityEvaluator,
+			final PrefixMapping prefixMapping) throws Exception {
 		final PrefixMapping pm = prefixMapping;
 		Assert.assertNotNull("PrefixMapping may not be null", pm);
 		Assert.assertTrue("PrefixMapping should be secured",
@@ -49,30 +48,24 @@ public class SecuredPrefixMappingTest
 		final SecuredPrefixMappingTest pmTest = new SecuredPrefixMappingTest(
 				securityEvaluator) {
 			@Override
-			public void setup()
-			{
+			public void setup() {
 				this.securedMapping = (SecuredPrefixMapping) pm;
 			}
 		};
 		Method lockTest = null;
-		for (final Method m : pmTest.getClass().getMethods())
-		{
-			if (m.isAnnotationPresent(Test.class))
-			{
+		for (final Method m : pmTest.getClass().getMethods()) {
+			if (m.isAnnotationPresent(Test.class)) {
 				// lock test must come last
-				if (m.getName().equals("testLock"))
-				{
+				if (m.getName().equals("testLock")) {
 					lockTest = m;
-				}
-				else
-				{
+				} else {
 					pmTest.setup();
 					m.invoke(pmTest);
 				}
 
 			}
 		}
-		Assert.assertNotNull( "Did not find 'testLock' method", lockTest );		
+		Assert.assertNotNull("Did not find 'testLock' method", lockTest);
 		pmTest.setup();
 		lockTest.invoke(pmTest);
 
@@ -83,15 +76,13 @@ public class SecuredPrefixMappingTest
 
 	protected SecuredPrefixMapping securedMapping;
 
-	public SecuredPrefixMappingTest( final SecurityEvaluator securityEvaluator )
-	{
+	public SecuredPrefixMappingTest(final SecurityEvaluator securityEvaluator) {
 		this.securityEvaluator = securityEvaluator;
 		this.principal = securityEvaluator.getPrincipal();
 	}
 
 	@Before
-	public void setup()
-	{
+	public void setup() {
 		final Graph g = GraphFactory.createDefaultGraph();
 
 		final SecuredGraph sg = Factory.getInstance(securityEvaluator,
@@ -100,72 +91,54 @@ public class SecuredPrefixMappingTest
 	}
 
 	@Test
-	public void testExpandPrefix()
-	{
-				try
-		{
+	public void testExpandPrefix() {
+		try {
 			securedMapping.expandPrefix("foo");
 			if (!securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final ReadDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testGetNsPrefixMap()
-	{
-				try
-		{
+	public void testGetNsPrefixMap() {
+		try {
 			securedMapping.getNsPrefixMap();
 			if (!securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final ReadDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testGetNsPrefixURI()
-	{
-				try
-		{
+	public void testGetNsPrefixURI() {
+		try {
 			securedMapping.getNsPrefixURI("foo");
 			if (!securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final ReadDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
@@ -173,48 +146,36 @@ public class SecuredPrefixMappingTest
 	}
 
 	@Test
-	public void testGetNsURIPrefix()
-	{
-				try
-		{
+	public void testGetNsURIPrefix() {
+		try {
 			securedMapping.getNsURIPrefix("http://example.com/foo");
 			if (!securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final ReadDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testLock()
-	{
-				try
-		{
+	public void testLock() {
+		try {
 			securedMapping.lock();
 			if (!securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown UpdateDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final UpdateDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown UpdateDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
@@ -222,48 +183,36 @@ public class SecuredPrefixMappingTest
 	}
 
 	@Test
-	public void testQnameFor()
-	{
-		try
-		{
+	public void testQnameFor() {
+		try {
 			securedMapping.qnameFor("http://example.com/foo/bar");
 			if (!securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final ReadDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
-								e, e.getTriple()));
+					securedMapping.getModelNode())) {
+				Assert.fail(String.format(
+						"Should not have thrown ReadDeniedException : %s - %s",
+						e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testRemoveNsPrefix()
-	{
-		try
-		{
+	public void testRemoveNsPrefix() {
+		try {
 			securedMapping.removeNsPrefix("foo");
 			if (!securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown UpdateDeniedException");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final UpdateDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown UpdateDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
@@ -271,168 +220,129 @@ public class SecuredPrefixMappingTest
 	}
 
 	@Test
-	public void testSamePrefixMappingAs()
-	{
-		try
-		{
+	public void testSamePrefixMappingAs() {
+		try {
 			securedMapping.samePrefixMappingAs(GraphFactory
 					.createDefaultGraph().getPrefixMapping());
 			if (!securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown ReadDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final ReadDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testSetNsPrefix()
-	{
-		try
-		{
+	public void testSetNsPrefix() {
+		try {
 			securedMapping.setNsPrefix("foo", "http://example.com/foo");
 			if (!securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 
-				Assert.fail("Should have thrown AccessDenied Exception");
+				Assert.fail("Should have thrown UpdateDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final UpdateDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown UpdateDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 
-		try
-		{
+		try {
 			securedMapping.setNsPrefixes(GraphFactory.createDefaultGraph()
 					.getPrefixMapping());
 			if (!securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown UpdateDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final UpdateDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown UpdateDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 
-		try
-		{
+		try {
 			securedMapping.setNsPrefixes(new HashMap<String, String>());
 			if (!securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown UpdateDeniedException Exception");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final UpdateDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown UpdateDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testShortForm()
-	{
-		try
-		{
+	public void testShortForm() {
+		try {
 			securedMapping.shortForm("http://example.com/foo/bar");
 			if (!securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown ReadDeniedException");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final ReadDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Read,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown ReadDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
 
 	@Test
-	public void testWithDefaultMappings()
-	{
+	public void testWithDefaultMappings() {
 		PrefixMapping pm = new PrefixMappingImpl();
-		pm.setNsPrefix( "example", "http://example.com");
-		try
-		{
+		pm.setNsPrefix("example", "http://example.com");
+		try {
 			// make sure that it must update
 			securedMapping.withDefaultMappings(pm);
 			if (!securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
-				Assert.fail("Should have thrown AccessDenied Exception");
+					securedMapping.getModelNode())) {
+				Assert.fail("Should have thrown UpdateDeniedException");
 			}
-		}
-		catch (final AccessDeniedException e)
-		{
+		} catch (final UpdateDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown UpdateDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}
 	}
-	
+
 	@Test
-	public void testWithDefaultMappingsNoAdd()
-	{
+	public void testWithDefaultMappingsNoAdd() {
 		PrefixMapping pm = new PrefixMappingImpl();
-		try
-		{
+		try {
 			// make sure that it must update
 			securedMapping.withDefaultMappings(pm);
-//			if (!securityEvaluator.evaluate(Action.Update,
-//					securedMapping.getModelNode()))
-//			{
-//				Assert.fail("Should have thrown AccessDenied Exception");
-//			}
-		}
-		catch (final AccessDeniedException e)
-		{
+			// if (!securityEvaluator.evaluate(Action.Update,
+			// securedMapping.getModelNode()))
+			// {
+			// Assert.fail("Should have thrown UpdateDeniedException Exception");
+			// }
+		} catch (final UpdateDeniedException e) {
 			if (securityEvaluator.evaluate(principal, Action.Update,
-					securedMapping.getModelNode()))
-			{
+					securedMapping.getModelNode())) {
 				Assert.fail(String
-						.format("Should not have thrown AccessDenied Exception: %s - %s",
+						.format("Should not have thrown UpdateDeniedException Exception: %s - %s",
 								e, e.getTriple()));
 			}
 		}

http://git-wip-us.apache.org/repos/asf/jena/blob/fcf71889/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java
index 18be198..857784a 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java
@@ -20,36 +20,32 @@ package org.apache.jena.permissions.graph;
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.jena.graph.Graph ;
+import org.apache.jena.graph.Graph;
 import org.apache.jena.permissions.MockSecurityEvaluator;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.tdb.TDB ;
-import org.apache.jena.tdb.TDBFactory ;
+import org.apache.jena.sparql.core.DatasetGraph;
+import org.apache.jena.tdb.TDB;
+import org.apache.jena.tdb.TDBFactory;
 import org.junit.After;
 
-public class TDBGraphTest extends MemGraphTest
-{
+public class TDBGraphTest extends MemGraphTest {
 
 	private DatasetGraph dsGraph;
 
 	private File f;
 
-	public TDBGraphTest( final MockSecurityEvaluator securityEvaluator )
-	{
+	public TDBGraphTest(final MockSecurityEvaluator securityEvaluator) {
 		super(securityEvaluator);
 	}
 
 	@Override
-	protected Graph createGraph() throws IOException
-	{
+	protected Graph createGraph() throws IOException {
 		TDB.init();
 		dsGraph = TDBFactory.createDataset().asDatasetGraph();
 		return dsGraph.getDefaultGraph();
 	}
 
 	@After
-	public void tearDown()
-	{
+	public void tearDown() {
 		TDB.sync(dsGraph);
 		dsGraph.close();
 		TDB.closedown();


Mime
View raw message