KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > loom > xmlpolicy > builder > TestResolver


1 /*
2  * Copyright (C) The Spice Group. All rights reserved.
3  *
4  * This software is published under the terms of the Spice
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.loom.xmlpolicy.builder;
9
10 import java.net.URL JavaDoc;
11 import java.security.Policy JavaDoc;
12 import java.util.Map JavaDoc;
13
14 import org.codehaus.loom.xmlpolicy.builder.PolicyResolver;
15 import org.codehaus.loom.xmlpolicy.runtime.DefaultPolicy;
16
17 /**
18  *
19  * @author Peter Donald
20  * @version $Revision: 1.1 $ $Date: 2004/04/19 22:20:26 $
21  */

22 class TestResolver
23     implements PolicyResolver
24 {
25     public URL JavaDoc resolveLocation( String JavaDoc location )
26         throws Exception JavaDoc
27     {
28         return new URL JavaDoc( location );
29     }
30
31     public Policy JavaDoc createPolicy( Map JavaDoc grants )
32         throws Exception JavaDoc
33     {
34         return new DefaultPolicy( grants );
35     }
36 }
37
Popular Tags