KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > ac > impl > InheritingPolicyManager


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17
18 package org.apache.lenya.ac.impl;
19
20 import org.apache.lenya.ac.AccessControlException;
21 import org.apache.lenya.ac.AccreditableManager;
22 import org.apache.lenya.ac.PolicyManager;
23
24 /**
25  * Policy manager which inherits credentials in a policy tree.
26  * @version $Id: InheritingPolicyManager.java 43241 2004-08-16 16:36:57Z andreas $
27  */

28 public interface InheritingPolicyManager extends PolicyManager {
29
30     /**
31      * Builds the URL policy for a URL from a file.
32      * When the file is not present, an empty policy is returned.
33      * @param controller The access controller to use.
34      * @param url The URL inside the web application.
35      * @return A policy.
36      * @throws AccessControlException when something went wrong.
37      */

38     DefaultPolicy buildURLPolicy(AccreditableManager controller, String JavaDoc url)
39         throws AccessControlException;
40
41     /**
42     * Builds a subtree policy from a file. When the file is not present, an empty policy is returned.
43     * @param controller The access controller to use.
44     * @param url The URL inside the web application.
45     * @return A policy.
46     * @throws AccessControlException when something went wrong.
47     */

48     DefaultPolicy buildSubtreePolicy(AccreditableManager controller, String JavaDoc url)
49         throws AccessControlException;
50         
51     /**
52      * Returns the existing policies for all URL steps, beginning with the root policy.
53      * @param controller The accreditable manager to use.
54      * @param url The URL inside the web application.
55      * @return An array of policies.
56      * @throws AccessControlException when something went wrong.
57      */

58     DefaultPolicy[] getPolicies(AccreditableManager controller, String JavaDoc url)
59         throws AccessControlException;
60
61     /**
62      * Saves a URL policy.
63      * @param url The URL to save the policy for.
64      * @param policy The policy to save.
65      * @throws AccessControlException when something went wrong.
66      */

67     void saveURLPolicy(String JavaDoc url, DefaultPolicy policy) throws AccessControlException;
68
69     /**
70      * Saves a Subtree policy.
71      * @param url The url to save the policy for.
72      * @param policy The policy to save.
73      * @throws AccessControlException when something went wrong.
74      */

75     void saveSubtreePolicy(String JavaDoc url, DefaultPolicy policy) throws AccessControlException;
76
77 }
78
Popular Tags