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.avalon.framework.component.Component;
22:
23: /**
24: * An AccreditableManager combines a UserManager, a GroupManager, an IPRangeManager and a
25: * RoleManager.
26: * @version $Id: AccreditableManager.java 499016 2007-01-23 13:18:39Z andreas $
27: */
28: public interface AccreditableManager extends Component {
29:
30: /**
31: * Avalon role.
32: */
33: String ROLE = AccreditableManager.class.getName();
34:
35: /**
36: * Returns the user manager of this access controller.
37: * @return A user manager.
38: * @throws AccessControlException when something went wrong.
39: */
40: UserManager getUserManager() throws AccessControlException;
41:
42: /**
43: * Returns the group manager of this access controller.
44: * @return A group manager.
45: * @throws AccessControlException when something went wrong.
46: */
47: GroupManager getGroupManager() throws AccessControlException;
48:
49: /**
50: * Returns the role manager of this access controller.
51: * @return A role manager.
52: * @throws AccessControlException when something went wrong.
53: */
54: RoleManager getRoleManager() throws AccessControlException;
55:
56: /**
57: * Returns the IP range manager of this access controller.
58: * @return An IP range manager.
59: * @throws AccessControlException when something went wrong.
60: */
61: IPRangeManager getIPRangeManager() throws AccessControlException;
62:
63: /**
64: * Attaches an item manager listener to this accreditable manager.
65: * @param listener An item manager listener.
66: */
67: void addItemManagerListener(ItemManagerListener listener);
68:
69: /**
70: * Removes an item manager listener from this accreditable manager.
71: * @param listener An item manager listener.
72: */
73: void removeItemManagerListener(ItemManagerListener listener);
74:
75: /**
76: * @return A source URI to store configuration sources. This URI
77: * must point to a collection.
78: */
79: String getConfigurationCollectionUri();
80:
81: /**
82: * @return The unique ID of this accreditable manager. It is used to check
83: * if two accreditables belong to the same accreditable manager.
84: */
85: String getId();
86:
87: }
|