01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: package org.apache.lenya.ac;
20:
21: import org.apache.lenya.ac.AccessControlException;
22: import org.apache.lenya.ac.AccreditableManager;
23: import org.apache.lenya.ac.PolicyManager;
24:
25: /**
26: * Policy manager which inherits credentials in a policy tree.
27: * @version $Id: InheritingPolicyManager.java 473861 2006-11-12 03:51:14Z gregor $
28: */
29: public interface InheritingPolicyManager extends PolicyManager {
30:
31: /**
32: * Builds a subtree policy from a file. When the file is not present, an empty policy is
33: * returned.
34: * @param controller The access controller to use.
35: * @param url The URL inside the web application.
36: * @return A policy.
37: * @throws AccessControlException when something went wrong.
38: */
39: Policy buildSubtreePolicy(AccreditableManager controller, String url)
40: throws AccessControlException;
41:
42: /**
43: * Returns the existing policies for all URL steps in bottom-up order, ending with the root policy.
44: * @param controller The accreditable manager to use.
45: * @param url The URL inside the web application.
46: * @return An array of policies.
47: * @throws AccessControlException when something went wrong.
48: */
49: Policy[] getPolicies(AccreditableManager controller, String url)
50: throws AccessControlException;
51:
52: /**
53: * Saves a Subtree policy.
54: * @param url The url to save the policy for.
55: * @param policy The policy to save.
56: * @throws AccessControlException when something went wrong.
57: */
58: void saveSubtreePolicy(String url, Policy policy)
59: throws AccessControlException;
60:
61: }
|