KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > ac > PolicyManager


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;
19
20 import org.apache.avalon.framework.component.Component;
21
22 /**
23  * A policy manager.
24  * @version $Id: PolicyManager.java 43240 2004-08-16 16:21:22Z andreas $
25  */

26 public interface PolicyManager extends Component {
27
28     /**
29      * The Avalon role.
30      */

31     String JavaDoc ROLE = PolicyManager.class.getName();
32
33     /**
34      * Returns the policy for a given page.
35      *
36      * @param controller The access controller.
37      * @param url The url inside the web application.
38      * @return The policy.
39      * @throws AccessControlException when something went wrong.
40      */

41     Policy getPolicy(AccreditableManager controller, String JavaDoc url) throws AccessControlException;
42
43     /**
44      * Called when an accreditable was added. Used to create the admin interface policy.
45      *
46      * @param manager The accreditable manager the accreditable belonged to.
47      * @param accreditable The accreditable that was removed.
48      * @throws AccessControlException when something went wrong.
49      */

50     void accreditableAdded(AccreditableManager manager, Accreditable accreditable) throws AccessControlException;
51
52     /**
53      * Called when an accreditable was removed. Used to clean up the policies
54      * and to remove the admin interface policy.
55      *
56      * @param manager The accreditable manager the accreditable belonged to.
57      * @param accreditable The accreditable that was removed.
58      * @throws AccessControlException when something went wrong.
59      */

60     void accreditableRemoved(AccreditableManager manager, Accreditable accreditable) throws AccessControlException;
61
62 }
63
Popular Tags