|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| PolicyResolver.java | - | - | - | - |
|
||||||||||||||
| 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.spice.xmlpolicy.builder;
|
|
| 9 |
|
|
| 10 |
import java.net.URL;
|
|
| 11 |
import java.security.Policy;
|
|
| 12 |
import java.util.Map;
|
|
| 13 |
|
|
| 14 |
/**
|
|
| 15 |
* This is the interface via which elements of Policy are resolved.
|
|
| 16 |
* For example it is possible for the Policy file to use abstract URLs
|
|
| 17 |
* such as "sar:/SAR-INF/lib/" which need to be mapped to a concrete
|
|
| 18 |
* URL. It is also necessary for the target values of permissions
|
|
| 19 |
* to be "resolved" using a pseuedo expression language.
|
|
| 20 |
*
|
|
| 21 |
* @author Peter Donald
|
|
| 22 |
* @version $Revision: 1.1 $ $Date: 2003/12/02 09:16:06 $
|
|
| 23 |
*/
|
|
| 24 |
public interface PolicyResolver |
|
| 25 |
{
|
|
| 26 |
/**
|
|
| 27 |
* Resolve a location to a URL.
|
|
| 28 |
*
|
|
| 29 |
* @param location the location
|
|
| 30 |
* @return the URL
|
|
| 31 |
* @throws Exception if unable to resolve URL
|
|
| 32 |
*/
|
|
| 33 |
URL resolveLocation( String location ) |
|
| 34 |
throws Exception;
|
|
| 35 |
|
|
| 36 |
/**
|
|
| 37 |
* Create a Policy object from a grant map.
|
|
| 38 |
*
|
|
| 39 |
* @param grants the grants map
|
|
| 40 |
* @return the Policy object
|
|
| 41 |
*/
|
|
| 42 |
Policy createPolicy( Map grants ) |
|
| 43 |
throws Exception;
|
|
| 44 |
} |
|
| 45 |
|
|
||||||||||