1 22 package org.jboss.test.security.proxy; 23 24 import java.io.IOException ; 25 import org.jboss.test.security.interfaces.ReadAccessException; 26 27 31 public class SessionSecurityProxy 32 { 33 34 public String retryableRead(String path) throws IOException 35 { 36 if( path.startsWith("/restricted") ) 37 throw new ReadAccessException("/restricted/* read access not allowed"); 38 return null; 39 } 40 41 public String read(String path) throws IOException 42 { 43 if( path.startsWith("/restricted") ) 44 throw new SecurityException ("/restricted/* read access not allowed"); 45 return null; 46 } 47 48 public void write(String path) throws IOException 49 { 50 if( path.startsWith("/restricted") ) 51 throw new SecurityException ("/restricted/* write access not allowed"); 52 } 53 } 54 | Popular Tags |